summaryrefslogtreecommitdiff
path: root/tests/test_connection.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_connection.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_connection.py')
-rwxr-xr-xtests/test_connection.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_connection.py b/tests/test_connection.py
index 833751b..0ab74d2 100755
--- a/tests/test_connection.py
+++ b/tests/test_connection.py
@@ -33,7 +33,7 @@ import psycopg2.errorcodes
from psycopg2 import extensions as ext
from testutils import (
- unittest, decorate_all_tests, skip_if_no_superuser,
+ unittest, assertDsnEqual, decorate_all_tests, skip_if_no_superuser,
skip_before_postgres, skip_after_postgres, skip_before_libpq,
ConnectingTestCase, skip_if_tpc_disabled, skip_if_windows)
@@ -412,7 +412,7 @@ class MakeDsnTestCase(ConnectingTestCase):
def test_empty_param(self):
dsn = ext.make_dsn(dbname='sony', password='')
- self.assertDsnEqual(dsn, "dbname=sony password=''")
+ assertDsnEqual(self, dsn, "dbname=sony password=''")
def test_escape(self):
dsn = ext.make_dsn(dbname='hello world')
@@ -435,10 +435,10 @@ class MakeDsnTestCase(ConnectingTestCase):
def test_params_merging(self):
dsn = ext.make_dsn('dbname=foo host=bar', host='baz')
- self.assertDsnEqual(dsn, 'dbname=foo host=baz')
+ assertDsnEqual(self, dsn, 'dbname=foo host=baz')
dsn = ext.make_dsn('dbname=foo', user='postgres')
- self.assertDsnEqual(dsn, 'dbname=foo user=postgres')
+ assertDsnEqual(self, dsn, 'dbname=foo user=postgres')
def test_no_dsn_munging(self):
dsnin = 'dbname=a host=b user=c password=d'
@@ -452,7 +452,7 @@ class MakeDsnTestCase(ConnectingTestCase):
self.assertEqual(dsn, url)
dsn = ext.make_dsn(url, application_name='woot')
- self.assertDsnEqual(dsn,
+ assertDsnEqual(self, dsn,
'dbname=test user=tester password=secret application_name=woot')
self.assertRaises(psycopg2.ProgrammingError,