From 88f2cd5b53415aeca72a6e798fad7d939e62713c Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Tue, 9 Jun 2020 09:16:07 +0200 Subject: [PATCH] Skip VTODO items for Fastmail See #824 --- tests/storage/servers/fastmail/__init__.py | 26 +++++++++++++--------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/tests/storage/servers/fastmail/__init__.py b/tests/storage/servers/fastmail/__init__.py index 6471ef3..1c21c6d 100644 --- a/tests/storage/servers/fastmail/__init__.py +++ b/tests/storage/servers/fastmail/__init__.py @@ -4,24 +4,28 @@ import pytest class ServerMixin: - @pytest.fixture - def get_storage_args(self, slow_create_collection): - def inner(collection='test'): + def get_storage_args(self, item_type, slow_create_collection): + if item_type == "VTODO": + # Fastmail has non-standard support for TODOs + # See https://github.com/pimutils/vdirsyncer/issues/824 + pytest.skip("Fastmail has non-standard VTODO support.") + + def inner(collection="test"): args = { - 'username': os.environ['FASTMAIL_USERNAME'], - 'password': os.environ['FASTMAIL_PASSWORD'] + "username": os.environ["FASTMAIL_USERNAME"], + "password": os.environ["FASTMAIL_PASSWORD"], } - if self.storage_class.fileext == '.ics': - args['url'] = 'https://caldav.fastmail.com/' - elif self.storage_class.fileext == '.vcf': - args['url'] = 'https://carddav.fastmail.com/' + if self.storage_class.fileext == ".ics": + args["url"] = "https://caldav.fastmail.com/" + elif self.storage_class.fileext == ".vcf": + args["url"] = "https://carddav.fastmail.com/" else: raise RuntimeError() if collection is not None: - args = slow_create_collection(self.storage_class, args, - collection) + args = slow_create_collection(self.storage_class, args, collection) return args + return inner