mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-22 13:35:53 +00:00
Flake 8
This commit is contained in:
parent
b3a720be75
commit
cd31e66798
4 changed files with 12 additions and 4 deletions
|
|
@ -7,7 +7,6 @@
|
|||
:license: MIT, see LICENSE for more details.
|
||||
'''
|
||||
|
||||
from unittest import TestCase
|
||||
import pytest
|
||||
from vdirsyncer.storage.base import Item
|
||||
from vdirsyncer.storage.memory import MemoryStorage
|
||||
|
|
@ -29,6 +28,7 @@ def test_irrelevant_status():
|
|||
assert empty_storage(a)
|
||||
assert empty_storage(b)
|
||||
|
||||
|
||||
def test_missing_status():
|
||||
a = MemoryStorage()
|
||||
b = MemoryStorage()
|
||||
|
|
@ -41,6 +41,7 @@ def test_missing_status():
|
|||
assert a.has('1.txt')
|
||||
assert b.has('1.txt')
|
||||
|
||||
|
||||
def test_missing_status_and_different_items():
|
||||
return # TODO
|
||||
a = MemoryStorage()
|
||||
|
|
@ -54,6 +55,7 @@ def test_missing_status_and_different_items():
|
|||
assert status
|
||||
assert_item_equals(a.get('1.txt')[0], b.get('1.txt')[0])
|
||||
|
||||
|
||||
def test_upload_and_update():
|
||||
a = MemoryStorage()
|
||||
b = MemoryStorage()
|
||||
|
|
@ -79,6 +81,7 @@ def test_upload_and_update():
|
|||
sync(a, b, status)
|
||||
assert_item_equals(b.get('2.txt')[0], item2)
|
||||
|
||||
|
||||
def test_deletion():
|
||||
a = MemoryStorage()
|
||||
b = MemoryStorage()
|
||||
|
|
@ -98,6 +101,7 @@ def test_deletion():
|
|||
sync(a, b, status)
|
||||
assert not a.has('1.txt') and not b.has('1.txt')
|
||||
|
||||
|
||||
def test_already_synced():
|
||||
a = MemoryStorage()
|
||||
b = MemoryStorage()
|
||||
|
|
@ -114,6 +118,7 @@ def test_already_synced():
|
|||
assert status == old_status
|
||||
assert a.has('1.txt') and b.has('1.txt')
|
||||
|
||||
|
||||
def test_conflict_resolution_both_etags_new():
|
||||
a = MemoryStorage()
|
||||
b = MemoryStorage()
|
||||
|
|
@ -135,6 +140,7 @@ def test_conflict_resolution_both_etags_new():
|
|||
assert u'UID:1' in n
|
||||
assert u'ASDASD' in n
|
||||
|
||||
|
||||
def test_conflict_resolution_new_etags_without_changes():
|
||||
a = MemoryStorage()
|
||||
b = MemoryStorage()
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
import vdirsyncer.utils as utils
|
||||
|
||||
|
||||
def test_parse_options():
|
||||
o = {
|
||||
'foo': 'yes',
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ def _main(env, file_cfg):
|
|||
'''
|
||||
Syncronize the given pairs. If no pairs are given, all will be
|
||||
synchronized.
|
||||
|
||||
|
||||
Examples:
|
||||
`vdirsyncer sync` will sync everything configured.
|
||||
`vdirsyncer sync bob frank` will sync the pairs "bob" and "frank".
|
||||
|
|
|
|||
|
|
@ -172,8 +172,9 @@ class DavStorage(Storage):
|
|||
rv.append((href, Item(obj), etag))
|
||||
try:
|
||||
hrefs_left.remove(href)
|
||||
except KeyError as e:
|
||||
raise KeyError('{} doesn\'t exist in {}'.format(href, hrefs_left))
|
||||
except KeyError:
|
||||
raise KeyError('{} doesn\'t exist in {}'
|
||||
.format(href, hrefs_left))
|
||||
for href in hrefs_left:
|
||||
raise exceptions.NotFoundError(href)
|
||||
return rv
|
||||
|
|
|
|||
Loading…
Reference in a new issue