diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2017-02-03 04:28:27 +0000 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2017-02-03 04:29:27 +0000 |
commit | e1ef55ffbcec7a9a7f8d978c572050f59b1dff4e (patch) | |
tree | a1da4c2e21a93c91b5229004d3d6183816d9b7b7 /tests/testutils.py | |
parent | c71559cf19adad51a029aebfd663401cdb130aa6 (diff) | |
download | psycopg2-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/testutils.py')
-rw-r--r-- | tests/testutils.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/testutils.py b/tests/testutils.py index d63dc00..69dfe85 100644 --- a/tests/testutils.py +++ b/tests/testutils.py @@ -134,7 +134,7 @@ class ConnectingTestCase(unittest.TestCase): import psycopg2 try: conn = self.connect(**kwargs) - if conn.async == 1: + if conn.async_ == 1: self.wait(conn) except psycopg2.OperationalError, e: # If pgcode is not set it is a genuine connection error @@ -459,3 +459,7 @@ class py3_raises_typeerror(object): if sys.version_info[0] >= 3: assert type is TypeError return True + + +def assertDsnEqual(testsuite, dsn1, dsn2): + testsuite.assertEqual(set(dsn1.split()), set(dsn2.split())) |