Skip to content
This repository has been archived by the owner on Jan 3, 2019. It is now read-only.

Commit

Permalink
pep8 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rich-hart committed Feb 12, 2015
1 parent 7622143 commit 3ff8f26
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions cnxauthoring/tests/test_storage/test_postgresql.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 3ff8f26

Please sign in to comment.