mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Fix tests and remove silly logging
This commit is contained in:
parent
762a3b219b
commit
64a8a682e9
2 changed files with 5 additions and 11 deletions
|
|
@ -118,10 +118,13 @@ class StorageTests(object):
|
||||||
# doesn't really work there. Skip those collections, as they
|
# doesn't really work there. Skip those collections, as they
|
||||||
# are not relevant to us.
|
# are not relevant to us.
|
||||||
continue
|
continue
|
||||||
|
collection = collections.remove(s.collection)
|
||||||
((href, etag),) = s.list()
|
((href, etag),) = s.list()
|
||||||
item, etag = s.get(href)
|
item, etag = s.get(href)
|
||||||
assert item.raw in items
|
assert item.raw in items
|
||||||
|
|
||||||
|
assert not collections
|
||||||
|
|
||||||
def test_collection_arg(self):
|
def test_collection_arg(self):
|
||||||
s = self.storage_class(**self.get_storage_args(collection='test2'))
|
s = self.storage_class(**self.get_storage_args(collection='test2'))
|
||||||
# Can't do stronger assertion because of radicale, which needs a
|
# Can't do stronger assertion because of radicale, which needs a
|
||||||
|
|
|
||||||
|
|
@ -94,17 +94,8 @@ class DavStorage(HttpStorageBase):
|
||||||
if self._session is None:
|
if self._session is None:
|
||||||
self._session = requests.session()
|
self._session = requests.session()
|
||||||
url = self.parsed_url.scheme + '://' + self.parsed_url.netloc + path
|
url = self.parsed_url.scheme + '://' + self.parsed_url.netloc + path
|
||||||
dav_logger.debug(u'Method: {}'.format(method))
|
return self._session.request(method, url, data=data, headers=headers,
|
||||||
dav_logger.debug(u'Path: {}'.format(path))
|
**self._settings)
|
||||||
dav_logger.debug(u'Headers: {}'.format(headers))
|
|
||||||
dav_logger.debug(u'/// DATA')
|
|
||||||
dav_logger.debug(data)
|
|
||||||
dav_logger.debug(u'/// END DATA')
|
|
||||||
r = self._session.request(method, url, data=data, headers=headers,
|
|
||||||
**self._settings)
|
|
||||||
dav_logger.debug(r.status_code)
|
|
||||||
dav_logger.debug(r.text)
|
|
||||||
return r
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _check_response(response):
|
def _check_response(response):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue