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:43:49 +0000 |
commit | ce9be69615c700a0472098c5db171d33091c0b5a (patch) | |
tree | 8472e70d36703bca457359fcc4e94e22c296ec94 /tests/testutils.py | |
parent | 8baf6aa37293c75e8ffbf150f6504faa43a08045 (diff) | |
download | psycopg2-ce9be69615c700a0472098c5db171d33091c0b5a.tar.gz |
Added async_ as an alias for async
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())) |