summaryrefslogtreecommitdiff
path: root/common/src
diff options
context:
space:
mode:
authorVictor Shyba <victor.shyba@gmail.com>2015-09-14 11:21:24 -0300
committerVictor Shyba <victor.shyba@gmail.com>2015-09-14 11:21:24 -0300
commitcd4c4f868e1c10e44f825efc0e870edf9fe8e2c1 (patch)
tree1065162fb4f0e67c9de517683aee55d2c90ff6c6 /common/src
parent3f5003afee45c02bb9668c150506447cf0d2f52c (diff)
[style] pep8 fixes
Diffstat (limited to 'common/src')
-rw-r--r--common/src/leap/soledad/common/tests/test_couch.py6
-rw-r--r--common/src/leap/soledad/common/tests/test_sqlcipher_sync.py6
-rw-r--r--common/src/leap/soledad/common/tests/test_sync_target.py7
-rw-r--r--common/src/leap/soledad/common/tests/util.py3
4 files changed, 14 insertions, 8 deletions
diff --git a/common/src/leap/soledad/common/tests/test_couch.py b/common/src/leap/soledad/common/tests/test_couch.py
index ae7933c3..845f1602 100644
--- a/common/src/leap/soledad/common/tests/test_couch.py
+++ b/common/src/leap/soledad/common/tests/test_couch.py
@@ -1285,7 +1285,8 @@ class CouchDatabaseSyncTests(
self.db1_copy.create_doc_from_json(tests.simple_doc, doc_id='doc2')
self.db1_copy.create_doc_from_json(tests.simple_doc, doc_id='doc3')
self.assertRaises(
- u1db_errors.InvalidTransactionId, self.sync, self.db1_copy, self.db2)
+ u1db_errors.InvalidTransactionId, self.sync,
+ self.db1_copy, self.db2)
def test_sync_detects_rollback_and_divergence_in_target(self):
self.db1 = self.create_database('test1', 'source')
@@ -1299,7 +1300,8 @@ class CouchDatabaseSyncTests(
self.db2_copy.create_doc_from_json(tests.simple_doc, doc_id='doc2')
self.db2_copy.create_doc_from_json(tests.simple_doc, doc_id='doc3')
self.assertRaises(
- u1db_errors.InvalidTransactionId, self.sync, self.db1, self.db2_copy)
+ u1db_errors.InvalidTransactionId, self.sync,
+ self.db1, self.db2_copy)
def test_optional_sync_preserve_json(self):
self.db1 = self.create_database('test1', 'source')
diff --git a/common/src/leap/soledad/common/tests/test_sqlcipher_sync.py b/common/src/leap/soledad/common/tests/test_sqlcipher_sync.py
index 2e703023..439fc070 100644
--- a/common/src/leap/soledad/common/tests/test_sqlcipher_sync.py
+++ b/common/src/leap/soledad/common/tests/test_sqlcipher_sync.py
@@ -35,7 +35,8 @@ from leap.soledad.client.crypto import decrypt_doc_dict
from leap.soledad.common.tests import u1db_tests as tests
from leap.soledad.common.tests.test_sqlcipher import SQLCIPHER_SCENARIOS
from leap.soledad.common.tests.util import make_soledad_app
-from leap.soledad.common.tests.test_sync_target import SoledadDatabaseSyncTargetTests
+from leap.soledad.common.tests.test_sync_target import \
+ SoledadDatabaseSyncTargetTests
from leap.soledad.common.tests.util import soledad_sync_target
from leap.soledad.common.tests.util import BaseSoledadTest
@@ -713,7 +714,8 @@ def make_local_db_and_soledad_target(
test, path='test',
source_replica_uid=uuid4().hex):
test.startTwistedServer()
- db = test.request_state._create_database(replica_uid=os.path.basename(path))
+ replica_uid = os.path.basename(path)
+ db = test.request_state._create_database(replica_uid)
sync_db = test._soledad._sync_db
sync_enc_pool = test._soledad._sync_enc_pool
st = soledad_sync_target(
diff --git a/common/src/leap/soledad/common/tests/test_sync_target.py b/common/src/leap/soledad/common/tests/test_sync_target.py
index ba556ea4..c0987e90 100644
--- a/common/src/leap/soledad/common/tests/test_sync_target.py
+++ b/common/src/leap/soledad/common/tests/test_sync_target.py
@@ -150,7 +150,8 @@ def make_local_db_and_soledad_target(
test, path='test',
source_replica_uid=uuid4().hex):
test.startTwistedServer()
- db = test.request_state._create_database(replica_uid=os.path.basename(path))
+ replica_uid = os.path.basename(path)
+ db = test.request_state._create_database(replica_uid)
sync_db = test._soledad._sync_db
sync_enc_pool = test._soledad._sync_enc_pool
st = soledad_sync_target(
@@ -360,8 +361,8 @@ class TestSoledadSyncTarget(
remote_target = self.getSyncTarget(
source_replica_uid='other-id')
yield remote_target.record_sync_info('other-id', 2, 'T-transid')
- self.assertEqual(
- (2, 'T-transid'), self.db2._get_replica_gen_and_trans_id('other-id'))
+ self.assertEqual((2, 'T-transid'),
+ self.db2._get_replica_gen_and_trans_id('other-id'))
@defer.inlineCallbacks
def test_sync_exchange_receive(self):
diff --git a/common/src/leap/soledad/common/tests/util.py b/common/src/leap/soledad/common/tests/util.py
index 617cccef..41307eb7 100644
--- a/common/src/leap/soledad/common/tests/util.py
+++ b/common/src/leap/soledad/common/tests/util.py
@@ -357,7 +357,8 @@ class CouchDBTestCase(unittest.TestCase, MockedSharedDBTest):
current_dbs = set([db for db in self.couch_server])
remaining_dbs = current_dbs - self.previous_dbs
if remaining_dbs:
- raise Exception("tests created %s and didn't clean up!", remaining_dbs)
+ raise Exception("tests created %s and didn't clean up!",
+ remaining_dbs)
def delete_db(self, name):
try: