From 3ff8f269faca3b037cd9474d0851d62e7646f91f Mon Sep 17 00:00:00 2001 From: rich-hart Date: Thu, 12 Feb 2015 10:38:42 -0600 Subject: [PATCH] pep8 changes --- cnxauthoring/tests/test_storage/test_postgresql.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/cnxauthoring/tests/test_storage/test_postgresql.py b/cnxauthoring/tests/test_storage/test_postgresql.py index 6fe76f6..fba3d64 100644 --- a/cnxauthoring/tests/test_storage/test_postgresql.py +++ b/cnxauthoring/tests/test_storage/test_postgresql.py @@ -86,17 +86,18 @@ def test_restart(self): import psycopg2 settings = integration_test_settings() test_db = settings[CONNECTION_SETTINGS_KEY] - self.addCleanup(setattr, self.storage, 'conn', psycopg2.connect(test_db)) - + self.addCleanup(setattr, self.storage, + 'conn', psycopg2.connect(test_db)) + # 0 if the connection is open, nonzero if it is closed or broken. OPEN = 0 - + self.assertEqual(self.storage.conn.closed, OPEN) - + self.storage.conn.close() self.assertNotEqual(self.storage.conn.closed, OPEN) - + self.storage.restart() - + self.assertEqual(self.storage.conn.closed, OPEN)