mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
parent
4f894e04dd
commit
88f2cd5b53
1 changed files with 15 additions and 11 deletions
|
|
@ -4,24 +4,28 @@ import pytest
|
||||||
|
|
||||||
|
|
||||||
class ServerMixin:
|
class ServerMixin:
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def get_storage_args(self, slow_create_collection):
|
def get_storage_args(self, item_type, slow_create_collection):
|
||||||
def inner(collection='test'):
|
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 = {
|
args = {
|
||||||
'username': os.environ['FASTMAIL_USERNAME'],
|
"username": os.environ["FASTMAIL_USERNAME"],
|
||||||
'password': os.environ['FASTMAIL_PASSWORD']
|
"password": os.environ["FASTMAIL_PASSWORD"],
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.storage_class.fileext == '.ics':
|
if self.storage_class.fileext == ".ics":
|
||||||
args['url'] = 'https://caldav.fastmail.com/'
|
args["url"] = "https://caldav.fastmail.com/"
|
||||||
elif self.storage_class.fileext == '.vcf':
|
elif self.storage_class.fileext == ".vcf":
|
||||||
args['url'] = 'https://carddav.fastmail.com/'
|
args["url"] = "https://carddav.fastmail.com/"
|
||||||
else:
|
else:
|
||||||
raise RuntimeError()
|
raise RuntimeError()
|
||||||
|
|
||||||
if collection is not None:
|
if collection is not None:
|
||||||
args = slow_create_collection(self.storage_class, args,
|
args = slow_create_collection(self.storage_class, args, collection)
|
||||||
collection)
|
|
||||||
return args
|
return args
|
||||||
|
|
||||||
return inner
|
return inner
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue