mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Fix testfailure due to missing fileext for Radicale
This commit is contained in:
parent
f6dfa424cb
commit
cdae049df2
2 changed files with 6 additions and 2 deletions
|
|
@ -108,4 +108,6 @@ class StorageTests(object):
|
||||||
|
|
||||||
def test_collection_arg(self):
|
def test_collection_arg(self):
|
||||||
s = self.storage_class(**self.get_storage_args(collection='asd'))
|
s = self.storage_class(**self.get_storage_args(collection='asd'))
|
||||||
assert s.collection == 'asd'
|
# Can't do stronger assertion because of radicale, which needs a
|
||||||
|
# fileextension to guess the collection type.
|
||||||
|
assert 'asd' in s.collection
|
||||||
|
|
|
||||||
|
|
@ -139,8 +139,10 @@ class DavStorageTests(StorageTests):
|
||||||
self.patcher = p = mock.patch('requests.Session.request', new=x)
|
self.patcher = p = mock.patch('requests.Session.request', new=x)
|
||||||
p.start()
|
p.start()
|
||||||
|
|
||||||
def get_storage_args(self, collection=None):
|
def get_storage_args(self, collection='test'):
|
||||||
url = 'http://127.0.0.1/bob/'
|
url = 'http://127.0.0.1/bob/'
|
||||||
|
if collection is not None:
|
||||||
|
collection += self.storage_class.fileext
|
||||||
return {'url': url, 'collection': collection}
|
return {'url': url, 'collection': collection}
|
||||||
|
|
||||||
def teardown_method(self, method):
|
def teardown_method(self, method):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue