mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-30 09:45:53 +00:00
"A from B" => "B/A"
This commit is contained in:
parent
07fbd9cb89
commit
c234bce656
2 changed files with 6 additions and 4 deletions
|
|
@ -34,8 +34,9 @@ class BaseStorageTests(object):
|
|||
|
||||
@pytest.fixture
|
||||
def get_storage(self, storage_args):
|
||||
def inner(**kw):
|
||||
return self.storage_class(**storage_args(**kw))
|
||||
def inner(collection=None, **kw):
|
||||
kw.update(storage_args(collection=collection))
|
||||
return self.storage_class(**kw)
|
||||
|
||||
return inner
|
||||
|
||||
|
|
@ -136,8 +137,9 @@ class BaseStorageTests(object):
|
|||
in s.get_multi(href for href, etag in iteritems(info))
|
||||
) == info
|
||||
|
||||
def test_repr(self, s):
|
||||
def test_repr(self, s, get_storage):
|
||||
assert self.storage_class.__name__ in repr(s)
|
||||
assert s.instance_name is None
|
||||
|
||||
|
||||
class SupportsCollections(object):
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ class Storage(object):
|
|||
raise ValueError('This storage is read-only.')
|
||||
self.read_only = bool(read_only)
|
||||
if collection and instance_name:
|
||||
instance_name = '{} from {}'.format(collection, instance_name)
|
||||
instance_name = '{}/{}'.format(instance_name, collection)
|
||||
self.instance_name = instance_name
|
||||
self.collection = collection
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue