diff options
Diffstat (limited to 'tests/test_cancel.py')
-rw-r--r-- | tests/test_cancel.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_cancel.py b/tests/test_cancel.py index 52383f8..8e651ff 100644 --- a/tests/test_cancel.py +++ b/tests/test_cancel.py @@ -2,18 +2,18 @@ import time import threading -from testutils import unittest, skip_if_no_pg_sleep -import tests import psycopg2 import psycopg2.extensions from psycopg2 import extras +from testconfig import dsn +from testutils import unittest, skip_if_no_pg_sleep class CancelTests(unittest.TestCase): def setUp(self): - self.conn = psycopg2.connect(tests.dsn) + self.conn = psycopg2.connect(dsn) cur = self.conn.cursor() cur.execute(''' CREATE TEMPORARY TABLE table1 ( @@ -65,7 +65,7 @@ class CancelTests(unittest.TestCase): @skip_if_no_pg_sleep('conn') def test_async_cancel(self): - async_conn = psycopg2.connect(tests.dsn, async=True) + async_conn = psycopg2.connect(dsn, async=True) self.assertRaises(psycopg2.OperationalError, async_conn.cancel) extras.wait_select(async_conn) cur = async_conn.cursor() @@ -79,7 +79,7 @@ class CancelTests(unittest.TestCase): self.assertEqual(cur.fetchall(), [(1, )]) def test_async_connection_cancel(self): - async_conn = psycopg2.connect(tests.dsn, async=True) + async_conn = psycopg2.connect(dsn, async=True) async_conn.close() self.assertTrue(async_conn.closed) |