Skip to content

Commit 88f2cd5

Browse files
author
Hugo Osvaldo Barrera
committed
Skip VTODO items for Fastmail
See #824
1 parent 4f894e0 commit 88f2cd5

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

tests/storage/servers/fastmail/__init__.py

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,28 @@
44

55

66
class ServerMixin:
7-
87
@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"):
1115
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"],
1418
}
1519

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/"
2024
else:
2125
raise RuntimeError()
2226

2327
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)
2629
return args
30+
2731
return inner

0 commit comments

Comments
 (0)