diff options
Diffstat (limited to 'tests/test_notify.py')
-rwxr-xr-x | tests/test_notify.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/test_notify.py b/tests/test_notify.py index bc14f37..a15aad6 100755 --- a/tests/test_notify.py +++ b/tests/test_notify.py @@ -3,23 +3,19 @@ from testutils import unittest import psycopg2 from psycopg2 import extensions +from testconfig import dsn +import sys import time import select import signal from subprocess import Popen, PIPE -import sys -if sys.version_info < (3,): - import tests -else: - import py3tests as tests - class NotifiesTests(unittest.TestCase): def setUp(self): - self.conn = psycopg2.connect(tests.dsn) + self.conn = psycopg2.connect(dsn) def tearDown(self): self.conn.close() @@ -54,7 +50,7 @@ curs.execute("NOTIFY " %(name)r %(payload)r) curs.close() conn.close() """ - % { 'dsn': tests.dsn, 'sec': sec, 'name': name, 'payload': payload}) + % { 'dsn': dsn, 'sec': sec, 'name': name, 'payload': payload}) return Popen([sys.executable, '-c', script], stdout=PIPE) |