summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorVictor Shyba <victor1984@riseup.net>2017-11-22 23:05:25 -0300
committerVictor Shyba <victor1984@riseup.net>2017-11-22 23:06:00 -0300
commit106dc814118d05a26861ba2e3c3d83f7e2764f96 (patch)
treef5e83cbca0caa5e039dcabebece99626c2cd30c6 /tests
parent502a9d24516f8b8af32b27a8445726687c0c5bff (diff)
[refactor] simplify decorated test parameters
Diffstat (limited to 'tests')
-rw-r--r--tests/couch/test_state.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/couch/test_state.py b/tests/couch/test_state.py
index 8599d173..2ebcbcb9 100644
--- a/tests/couch/test_state.py
+++ b/tests/couch/test_state.py
@@ -21,7 +21,7 @@ def restricted_listing(function):
@mock.patch('leap.soledad.common.couch.check.list_dbs')
def _set_list(self, *args, **kwargs):
args[-1].return_value = defer.succeed([self.db.name])
- return function(self, *args, **kwargs)
+ return function(self)
return _set_list
@@ -40,7 +40,7 @@ class CouchStateTests(CouchDBTestCase):
@restricted_listing
@defer.inlineCallbacks
- def test__check_db_schema_version_wrong_schema_version_raises(self, lmock):
+ def test__check_db_schema_version_wrong_schema_version_raises(self):
wrong_schema_version = SCHEMA_VERSION + 1
self.db.create(
{'_id': CONFIG_DOC_ID, SCHEMA_VERSION_KEY: wrong_schema_version})
@@ -50,7 +50,7 @@ class CouchStateTests(CouchDBTestCase):
@restricted_listing
@defer.inlineCallbacks
- def test_check_schema_versions_wrong_schema_version_raises(self, lmock):
+ def test_check_schema_versions_wrong_schema_version_raises(self):
wrong_schema_version = SCHEMA_VERSION + 1
self.db.create(
{'_id': CONFIG_DOC_ID, SCHEMA_VERSION_KEY: wrong_schema_version})
@@ -61,7 +61,7 @@ class CouchStateTests(CouchDBTestCase):
@restricted_listing
@defer.inlineCallbacks
- def test__check_db_schema_version_missing_config_doc_raises(self, lmock):
+ def test__check_db_schema_version_missing_config_doc_raises(self):
self.db.create({})
with pytest.raises(MissingCouchConfigDocumentError):
yield _check_db_schema_version(
@@ -69,7 +69,7 @@ class CouchStateTests(CouchDBTestCase):
@restricted_listing
@defer.inlineCallbacks
- def test_check_schema_versions_missing_config_doc_raises(self, lmock):
+ def test_check_schema_versions_missing_config_doc_raises(self):
self.db.create({})
expected_msg = 'Error checking CouchDB schema versions: ' \
'FirstError.*MissingCouchConfigDocumentError()'