mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Extra sanity checks and debugging
This commit is contained in:
parent
5527602a62
commit
d6b3c6d328
2 changed files with 4 additions and 2 deletions
|
|
@ -26,7 +26,9 @@ class StorageTests(object):
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
def _get_storage(self):
|
def _get_storage(self):
|
||||||
return self.storage_class(**self.get_storage_args())
|
s = self.storage_class(**self.get_storage_args())
|
||||||
|
assert not list(s.list())
|
||||||
|
return s
|
||||||
|
|
||||||
def test_generic(self):
|
def test_generic(self):
|
||||||
items = map(self._create_bogus_item, range(1, 10))
|
items = map(self._create_bogus_item, range(1, 10))
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@ class DavStorage(Storage):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _check_response(response):
|
def _check_response(response):
|
||||||
if response.status_code == 412:
|
if response.status_code == 412:
|
||||||
raise exceptions.PreconditionFailed()
|
raise exceptions.PreconditionFailed(response.reason)
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
|
|
||||||
def get(self, href):
|
def get(self, href):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue