From 4b0dc38d6eaa970b49cadbf5c0174eb7c34197fc Mon Sep 17 00:00:00 2001 From: antialias Date: Wed, 30 Jan 2013 13:26:18 -0500 Subject: pep8. --- src/leap/email/smtp/smtprelay.py | 4 ++-- src/leap/email/smtp/tests/test_smtprelay.py | 2 +- src/leap/soledad/tests/test_couch.py | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/leap/email/smtp/smtprelay.py b/src/leap/email/smtp/smtprelay.py index 7a647717..fdb8eb91 100644 --- a/src/leap/email/smtp/smtprelay.py +++ b/src/leap/email/smtp/smtprelay.py @@ -106,7 +106,7 @@ class EncryptedMessage(): """Separate message headers from body.""" sep = self.lines.index('') self.headers = self.lines[:sep] - self.body = self.lines[sep+1:] + self.body = self.lines[sep + 1:] def connectionLost(self): log.msg("Connection lost unexpectedly!") @@ -128,7 +128,7 @@ class EncryptedMessage(): def sendMessage(self): self.prepareHeader() - msg = '\n'.join(self.headers+[self.cyphertext]) + msg = '\n'.join(self.headers + [self.cyphertext]) d = defer.Deferred() factory = smtp.ESMTPSenderFactory(self.smtp_username, self.smtp_password, diff --git a/src/leap/email/smtp/tests/test_smtprelay.py b/src/leap/email/smtp/tests/test_smtprelay.py index 109e253b..1c549eb3 100644 --- a/src/leap/email/smtp/tests/test_smtprelay.py +++ b/src/leap/email/smtp/tests/test_smtprelay.py @@ -60,7 +60,7 @@ class TestSmtpRelay(tests.OpenPGPTestCase): for i, line in enumerate(self.EMAIL_DATA): proto.lineReceived(line + '\r\n') self.assertMatch(transport.value(), - '\r\n'.join(SMTP_ANSWERS[0:i+1])) + '\r\n'.join(SMTP_ANSWERS[0:i + 1])) proto.setTimeout(None) def test_message_encrypt(self): diff --git a/src/leap/soledad/tests/test_couch.py b/src/leap/soledad/tests/test_couch.py index b5d6378c..02399e4c 100644 --- a/src/leap/soledad/tests/test_couch.py +++ b/src/leap/soledad/tests/test_couch.py @@ -110,7 +110,7 @@ class CouchDBTestCase(unittest.TestCase): class TestCouchBackendImpl(CouchDBTestCase): def test__allocate_doc_id(self): - db = couch.CouchDatabase('http://localhost:'+str(self.wrapper.port), + db = couch.CouchDatabase('http://localhost:' + str(self.wrapper.port), 'u1db_tests') doc_id1 = db._allocate_doc_id() self.assertTrue(doc_id1.startswith('D-')) @@ -125,13 +125,13 @@ class TestCouchBackendImpl(CouchDBTestCase): def make_couch_database_for_test(test, replica_uid): port = str(test.wrapper.port) - return couch.CouchDatabase('http://localhost:'+port, replica_uid, + return couch.CouchDatabase('http://localhost:' + port, replica_uid, replica_uid=replica_uid or 'test') def copy_couch_database_for_test(test, db): port = str(test.wrapper.port) - new_db = couch.CouchDatabase('http://localhost:'+port, + new_db = couch.CouchDatabase('http://localhost:' + port, db._replica_uid + '_copy', replica_uid=db._replica_uid or 'test') gen, docs = db.get_all_docs(include_deleted=True) -- cgit v1.2.3