summaryrefslogtreecommitdiff
path: root/src/leap/soledad/tests
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-04-09 10:09:38 -0300
committerdrebs <drebs@leap.se>2013-04-09 10:09:38 -0300
commita8adbad77d34c66eda2a79e19b9afbc0f3d471a6 (patch)
tree5082c213fb1bea9c12746c294f019623af6353d9 /src/leap/soledad/tests
parente6ca75a9e2a7a634f92ae54238df7d86100fbdab (diff)
Eliminate the use of super() in main code.
Tests inherited from u1db still use super, but that can be changed in the future.
Diffstat (limited to 'src/leap/soledad/tests')
-rw-r--r--src/leap/soledad/tests/test_couch.py23
-rw-r--r--src/leap/soledad/tests/test_sqlcipher.py11
2 files changed, 17 insertions, 17 deletions
diff --git a/src/leap/soledad/tests/test_couch.py b/src/leap/soledad/tests/test_couch.py
index c02d485b..d9cdf788 100644
--- a/src/leap/soledad/tests/test_couch.py
+++ b/src/leap/soledad/tests/test_couch.py
@@ -112,14 +112,14 @@ class CouchDBTestCase(unittest.TestCase):
self.wrapper = CouchDBWrapper()
self.wrapper.start()
#self.db = self.wrapper.db
- super(CouchDBTestCase, self).setUp()
+ unittest.TestCase.setUp(self)
def tearDown(self):
"""
Stop CouchDB instance for test.
"""
self.wrapper.stop()
- super(CouchDBTestCase, self).tearDown()
+ unittest.TestCase.tearDown(self)
#-----------------------------------------------------------------------------
@@ -177,7 +177,7 @@ class CouchTests(test_backends.AllDatabaseTests, CouchDBTestCase):
def tearDown(self):
self.db.delete_database()
- super(CouchTests, self).tearDown()
+ test_backends.AllDatabaseTests.tearDown(self)
class CouchDatabaseTests(test_backends.LocalDatabaseTests, CouchDBTestCase):
@@ -186,7 +186,7 @@ class CouchDatabaseTests(test_backends.LocalDatabaseTests, CouchDBTestCase):
def tearDown(self):
self.db.delete_database()
- super(CouchDatabaseTests, self).tearDown()
+ test_backends.LocalDatabaseTests.tearDown(self)
class CouchValidateGenNTransIdTests(
@@ -196,7 +196,7 @@ class CouchValidateGenNTransIdTests(
def tearDown(self):
self.db.delete_database()
- super(CouchValidateGenNTransIdTests, self).tearDown()
+ test_backends.LocalDatabaseValidateGenNTransIdTests.tearDown(self)
class CouchValidateSourceGenTests(
@@ -206,7 +206,7 @@ class CouchValidateSourceGenTests(
def tearDown(self):
self.db.delete_database()
- super(CouchValidateSourceGenTests, self).tearDown()
+ test_backends.LocalDatabaseValidateSourceGenTests.tearDown(self)
class CouchWithConflictsTests(
@@ -216,7 +216,7 @@ class CouchWithConflictsTests(
def tearDown(self):
self.db.delete_database()
- super(CouchWithConflictsTests, self).tearDown()
+ test_backends.LocalDatabaseWithConflictsTests.tearDown(self)
# Notice: the CouchDB backend is currently used for storing encrypted data in
@@ -229,7 +229,7 @@ class CouchIndexTests(test_backends.DatabaseIndexTests, CouchDBTestCase):
def tearDown(self):
self.db.delete_database()
- super(CouchIndexTests, self).tearDown()
+ test_backends.DatabaseIndexTests.tearDown(self)
#-----------------------------------------------------------------------------
@@ -251,7 +251,7 @@ class CouchDatabaseSyncTargetTests(test_sync.DatabaseSyncTargetTests,
def tearDown(self):
self.db.delete_database()
- super(CouchDatabaseSyncTargetTests, self).tearDown()
+ test_sync.DatabaseSyncTargetTests.tearDown(self)
def test_sync_exchange_returns_many_new_docs(self):
# This test was replicated to allow dictionaries to be compared after
@@ -293,7 +293,8 @@ class CouchDatabaseSyncTests(test_sync.DatabaseSyncTests, CouchDBTestCase):
self.db1 = None
self.db2 = None
self.db3 = None
- super(CouchDatabaseSyncTests, self).setUp()
+ test_sync.DatabaseSyncTests.setUp(self)
+ CouchDBTestCase.setUp(self)
def tearDown(self):
self.db and self.db.delete_database()
@@ -306,7 +307,7 @@ class CouchDatabaseSyncTests(test_sync.DatabaseSyncTests, CouchDBTestCase):
db.delete_database()
db = self.create_database('test3', 'target')
db.delete_database()
- super(CouchDatabaseSyncTests, self).tearDown()
+ test_sync.DatabaseSyncTests.tearDown(self)
#-----------------------------------------------------------------------------
diff --git a/src/leap/soledad/tests/test_sqlcipher.py b/src/leap/soledad/tests/test_sqlcipher.py
index 23847556..b71478ac 100644
--- a/src/leap/soledad/tests/test_sqlcipher.py
+++ b/src/leap/soledad/tests/test_sqlcipher.py
@@ -139,11 +139,11 @@ class TestSQLCipherDatabase(test_sqlite_backend.TestSQLiteDatabase):
def __init__(self, dbname, ntry):
self._try = ntry
self._is_initialized_invocations = 0
- super(SQLCipherDatabaseTesting, self).__init__(dbname,
- PASSWORD)
+ SQLCipherDatabase.__init__(self, dbname, PASSWORD)
def _is_initialized(self, c):
- res = super(SQLCipherDatabaseTesting, self)._is_initialized(c)
+ res = \
+ SQLCipherDatabase._is_initialized(self, c)
if self._try == 1:
self._is_initialized_invocations += 1
if self._is_initialized_invocations == 2:
@@ -183,8 +183,7 @@ class TestSQLCipherPartialExpandDatabase(
# our backend be instantiated in place.
def setUp(self):
- super(test_sqlite_backend.TestSQLitePartialExpandDatabase,
- self).setUp()
+ test_sqlite_backend.TestSQLitePartialExpandDatabase.setUp(self)
self.db = SQLCipherDatabase(':memory:', PASSWORD)
self.db._set_replica_uid('test')
@@ -264,7 +263,7 @@ class TestSQLCipherPartialExpandDatabase(
@classmethod
def _which_index_storage(cls, c):
- res = super(SQLiteDatabaseTesting, cls)._which_index_storage(c)
+ res = SQLCipherDatabase._which_index_storage(c)
db._ensure_schema() # init db
observed.append(res[0])
return res