diff options
author | Victor Shyba <victor.shyba@gmail.com> | 2015-11-03 12:50:06 -0300 |
---|---|---|
committer | Victor Shyba <victor.shyba@gmail.com> | 2015-11-03 12:50:06 -0300 |
commit | 397343f890dbce9b3d6e9377b54c1f804d39479c (patch) | |
tree | 7db9a63820e7cac5a4dde1ae3f8fc8a6344ab8c6 /common/src | |
parent | 5e47ff186db38b1f610444f19ec57c838efbbf03 (diff) |
[style] pep8
Diffstat (limited to 'common/src')
-rw-r--r-- | common/src/leap/soledad/common/couch/state.py | 8 | ||||
-rw-r--r-- | common/src/leap/soledad/common/tests/test_couch.py | 3 |
2 files changed, 6 insertions, 5 deletions
diff --git a/common/src/leap/soledad/common/couch/state.py b/common/src/leap/soledad/common/couch/state.py index 40c0d55b..4f07c105 100644 --- a/common/src/leap/soledad/common/couch/state.py +++ b/common/src/leap/soledad/common/couch/state.py @@ -133,10 +133,10 @@ class CouchServerState(ServerState): """ with couch_server(self.couch_url) as server: # the tokens db rotates every 30 days, and the current db name is - # "tokens_NNN", where NNN is the number of seconds since epoch divided - # by the rotate period in seconds. When rotating, old and new tokens - # db coexist during a certain window of time and valid tokens are - # replicated from the old db to the new one. See: + # "tokens_NNN", where NNN is the number of seconds since epoch + # divide dby the rotate period in seconds. When rotating, old and + # new tokens db coexist during a certain window of time and valid + # tokens are replicated from the old db to the new one. See: # https://leap.se/code/issues/6785 dbname = self._tokens_dbname() db = server[dbname] diff --git a/common/src/leap/soledad/common/tests/test_couch.py b/common/src/leap/soledad/common/tests/test_couch.py index a311e0ef..be297b84 100644 --- a/common/src/leap/soledad/common/tests/test_couch.py +++ b/common/src/leap/soledad/common/tests/test_couch.py @@ -1437,7 +1437,8 @@ class SoledadBackendExceptionsTests(CouchDBTestCase): class DatabaseNameValidationTest(unittest.TestCase): def test_database_name_validation(self): - self.assertFalse(couch.state.is_db_name_valid("user-deadbeef | cat /secret")) + inject = couch.state.is_db_name_valid("user-deadbeef | cat /secret") + self.assertFalse(inject) self.assertTrue(couch.state.is_db_name_valid("user-cafe1337")) |