summaryrefslogtreecommitdiff
path: root/tests/test_cancel.py
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2017-02-03 04:28:27 +0000
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2017-02-03 04:29:27 +0000
commite1ef55ffbcec7a9a7f8d978c572050f59b1dff4e (patch)
treea1da4c2e21a93c91b5229004d3d6183816d9b7b7 /tests/test_cancel.py
parentc71559cf19adad51a029aebfd663401cdb130aa6 (diff)
downloadpsycopg2-async-keyword.tar.gz
Added async_ as an alias for asyncasync-keyword
Added in argument for psycopg2.connect() and connection.__init__, and for the connection.async attribute.
Diffstat (limited to 'tests/test_cancel.py')
-rwxr-xr-xtests/test_cancel.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_cancel.py b/tests/test_cancel.py
index a8eb750..6f66ef7 100755
--- a/tests/test_cancel.py
+++ b/tests/test_cancel.py
@@ -87,7 +87,7 @@ class CancelTests(ConnectingTestCase):
@skip_before_postgres(8, 2)
def test_async_cancel(self):
- async_conn = psycopg2.connect(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()
@@ -101,7 +101,7 @@ class CancelTests(ConnectingTestCase):
self.assertEqual(cur.fetchall(), [(1, )])
def test_async_connection_cancel(self):
- async_conn = psycopg2.connect(dsn, async=True)
+ async_conn = psycopg2.connect(dsn, async_=True)
async_conn.close()
self.assertTrue(async_conn.closed)