mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-25 08:55:50 +00:00
Flake8
This commit is contained in:
parent
d41d974608
commit
cef68b5d09
5 changed files with 8 additions and 4 deletions
|
|
@ -43,6 +43,7 @@ create table property (
|
|||
|
||||
storage_backend = os.environ.get('RADICALE_BACKEND', '') or 'filesystem'
|
||||
|
||||
|
||||
def do_the_radicale_dance(tmpdir):
|
||||
# All of radicale is already global state, the cleanliness of the code and
|
||||
# all hope is already lost. This function runs before every test.
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ import requests.exceptions
|
|||
|
||||
dav_server = os.environ.get('DAV_SERVER', '').strip() or 'radicale'
|
||||
|
||||
|
||||
def _get_server_mixin(server_name):
|
||||
from . import __name__ as base
|
||||
x = __import__('{}.servers.{}'.format(base, server_name), fromlist=[''])
|
||||
|
|
@ -102,7 +103,6 @@ class DavStorageTests(ServerMixin, StorageTests):
|
|||
super(DavStorageTests, self).test_update_nonexisting()
|
||||
|
||||
|
||||
|
||||
class TestCaldavStorage(DavStorageTests):
|
||||
storage_class = CaldavStorage
|
||||
|
||||
|
|
@ -240,12 +240,12 @@ class TestCaldavStorage(DavStorageTests):
|
|||
monkeypatch.setattr('requests.sessions.Session.request', request)
|
||||
|
||||
with pytest.raises(vdirsyncer.exceptions.StorageError):
|
||||
s = self.storage_class(**args)
|
||||
self.storage_class(**args)
|
||||
assert len(calls) == 1
|
||||
|
||||
def test_empty_get_multi_performance(self, monkeypatch):
|
||||
s = self._get_storage()
|
||||
|
||||
|
||||
def breakdown(*a, **kw):
|
||||
raise AssertionError('Expected not to be called.')
|
||||
|
||||
|
|
@ -253,6 +253,7 @@ class TestCaldavStorage(DavStorageTests):
|
|||
|
||||
assert list(s.get_multi([])) == []
|
||||
|
||||
|
||||
class TestCarddavStorage(DavStorageTests):
|
||||
storage_class = CarddavStorage
|
||||
item_template = VCARD_TEMPLATE
|
||||
|
|
|
|||
|
|
@ -167,6 +167,7 @@ def test_conflict_resolution_new_etags_without_changes():
|
|||
sync(a, b, status)
|
||||
assert status == {'1': (href_a, etag_a, href_b, etag_b)}
|
||||
|
||||
|
||||
def test_uses_get_multi(monkeypatch):
|
||||
def breakdown(*a, **kw):
|
||||
raise AssertionError('Expected use of get_multi')
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
from .. import exceptions
|
||||
|
||||
|
||||
class Item(object):
|
||||
|
||||
'''should-be-immutable wrapper class for VCALENDAR and VCARD'''
|
||||
|
|
|
|||
|
|
@ -335,7 +335,7 @@ class CaldavStorage(DavStorage):
|
|||
end = end.strftime(CALDAV_DT_FORMAT)
|
||||
|
||||
timefilter = ('<C:time-range start="{start}" end="{end}"/>'
|
||||
.format(start=start, end=end))
|
||||
.format(start=start, end=end))
|
||||
else:
|
||||
timefilter = ''
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue