|
4 | 4 |
|
5 | 5 |
|
6 | 6 | class ServerMixin:
|
7 |
| - |
8 | 7 | @pytest.fixture
|
9 |
| - def get_storage_args(self, slow_create_collection): |
10 |
| - def inner(collection='test'): |
| 8 | + def get_storage_args(self, item_type, slow_create_collection): |
| 9 | + if item_type == "VTODO": |
| 10 | + # Fastmail has non-standard support for TODOs |
| 11 | + # See https://github.com/pimutils/vdirsyncer/issues/824 |
| 12 | + pytest.skip("Fastmail has non-standard VTODO support.") |
| 13 | + |
| 14 | + def inner(collection="test"): |
11 | 15 | args = {
|
12 |
| - 'username': os.environ['FASTMAIL_USERNAME'], |
13 |
| - 'password': os.environ['FASTMAIL_PASSWORD'] |
| 16 | + "username": os.environ["FASTMAIL_USERNAME"], |
| 17 | + "password": os.environ["FASTMAIL_PASSWORD"], |
14 | 18 | }
|
15 | 19 |
|
16 |
| - if self.storage_class.fileext == '.ics': |
17 |
| - args['url'] = 'https://caldav.fastmail.com/' |
18 |
| - elif self.storage_class.fileext == '.vcf': |
19 |
| - args['url'] = 'https://carddav.fastmail.com/' |
| 20 | + if self.storage_class.fileext == ".ics": |
| 21 | + args["url"] = "https://caldav.fastmail.com/" |
| 22 | + elif self.storage_class.fileext == ".vcf": |
| 23 | + args["url"] = "https://carddav.fastmail.com/" |
20 | 24 | else:
|
21 | 25 | raise RuntimeError()
|
22 | 26 |
|
23 | 27 | if collection is not None:
|
24 |
| - args = slow_create_collection(self.storage_class, args, |
25 |
| - collection) |
| 28 | + args = slow_create_collection(self.storage_class, args, collection) |
26 | 29 | return args
|
| 30 | + |
27 | 31 | return inner
|
0 commit comments