summaryrefslogtreecommitdiff
path: root/service/test/bitmask_libraries/soledad_test.py
diff options
context:
space:
mode:
authorBruno Wagner Goncalves <bwagner@thoughtworks.com>2014-08-18 19:14:55 -0300
committerBruno Wagner Goncalves <bwagner@thoughtworks.com>2014-08-18 19:15:05 -0300
commit2c6fe6e4cca9c39287c0c9a88079a60078711e97 (patch)
tree9cd73392e3fc5646dca87bbefc758c9c975f4558 /service/test/bitmask_libraries/soledad_test.py
parent3cc37ad518706c7abe61d3d3cd7b91798901cc5b (diff)
Fixed pep8 errors on service
Diffstat (limited to 'service/test/bitmask_libraries/soledad_test.py')
-rw-r--r--service/test/bitmask_libraries/soledad_test.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/service/test/bitmask_libraries/soledad_test.py b/service/test/bitmask_libraries/soledad_test.py
index 1c1c105e..0d865291 100644
--- a/service/test/bitmask_libraries/soledad_test.py
+++ b/service/test/bitmask_libraries/soledad_test.py
@@ -7,7 +7,7 @@ from abstract_leap_test import AbstractLeapTest
class SoledadSessionTest(AbstractLeapTest):
def setUp(self):
- #given
+ # given
self.provider.fetch_soledad_json.return_value = {'hosts': {
'couch1': {
'hostname': 'couch1.some-server.test',
@@ -18,37 +18,37 @@ class SoledadSessionTest(AbstractLeapTest):
@patch('app.bitmask_libraries.soledad.Soledad.__init__')
def test_that_soledad_is_created_with_required_params(self, soledad_mock, init_mock):
- #when
+ # when
SoledadSession(self.provider, 'any-passphrase', self.srp_session)
- #then
+ # then
init_mock.assert_called_with(self.uuid, 'any-passphrase', '%s/soledad/%s.secret' % (self.leap_home, self.uuid),
- '%s/soledad/%s.db' % (self.leap_home, self.uuid),
- 'https://couch1.some-server.test:1234/user-%s' % self.uuid,
- '/some/path/to/ca_cert', self.token)
+ '%s/soledad/%s.db' % (self.leap_home, self.uuid),
+ 'https://couch1.some-server.test:1234/user-%s' % self.uuid,
+ '/some/path/to/ca_cert', self.token)
def test_that_sync_is_called(self, soledad_mock):
instance = soledad_mock.return_value
- instance.server_url = '/foo/bar'
+ instance.server_url = '/foo/bar'
instance.need_sync.return_value = True
soledad_session = SoledadSession(self.provider, 'any-passphrase', self.srp_session)
- #when
+ # when
soledad_session.sync()
- #then
+ # then
instance.need_sync.assert_called_with('/foo/bar')
instance.sync.assert_called_with()
def test_that_sync_not_called_if_not_needed(self, mock):
instance = mock.return_value
- instance.server_url = '/foo/bar'
+ instance.server_url = '/foo/bar'
instance.need_sync.return_value = False
soledad_session = SoledadSession(self.provider, 'any-passphrase', self.srp_session)
- #when
+ # when
soledad_session.sync()
- #then
+ # then
instance.need_sync.assert_called_with('/foo/bar')
self.assertFalse(instance.sync.called)