mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
More safety checks for #315
This commit is contained in:
parent
3b9cce2128
commit
129c9305f7
2 changed files with 6 additions and 0 deletions
|
|
@ -315,6 +315,11 @@ def test_create_collections(subtest, collections):
|
||||||
set(x.basename for x in tmpdir.join('bar').listdir()) == \
|
set(x.basename for x in tmpdir.join('bar').listdir()) == \
|
||||||
set(collections)
|
set(collections)
|
||||||
|
|
||||||
|
result = runner.invoke(
|
||||||
|
['sync'] + ['foobar/' + x for x in collections]
|
||||||
|
)
|
||||||
|
assert not result.exception
|
||||||
|
|
||||||
|
|
||||||
def test_ident_conflict(tmpdir, runner):
|
def test_ident_conflict(tmpdir, runner):
|
||||||
runner.write_with_general(dedent('''
|
runner.write_with_general(dedent('''
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@ class Storage(with_metaclass(StorageMeta)):
|
||||||
self.read_only = bool(read_only)
|
self.read_only = bool(read_only)
|
||||||
|
|
||||||
if collection and instance_name:
|
if collection and instance_name:
|
||||||
|
assert isinstance(collection, str)
|
||||||
instance_name = '{}/{}'.format(instance_name, collection)
|
instance_name = '{}/{}'.format(instance_name, collection)
|
||||||
self.instance_name = instance_name
|
self.instance_name = instance_name
|
||||||
self.collection = collection
|
self.collection = collection
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue