summaryrefslogtreecommitdiff
path: root/tests/test_connection.py
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2017-03-01 20:12:13 +0000
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2017-03-01 20:12:13 +0000
commit44d8edfd8c3bcaa3167e84fd11cc62b43bfd3af5 (patch)
tree0eb7221647e009e7b3675d63381cef500cccf08f /tests/test_connection.py
parent455f51c36ce6100b0da816e0056af60fa978c8a6 (diff)
downloadpsycopg2-fix-517.tar.gz
Ignore None arguments passed to make_dsn()fix-517
Close #517.
Diffstat (limited to 'tests/test_connection.py')
-rwxr-xr-xtests/test_connection.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_connection.py b/tests/test_connection.py
index a9525b4..dae0560 100755
--- a/tests/test_connection.py
+++ b/tests/test_connection.py
@@ -459,6 +459,10 @@ class MakeDsnTestCase(ConnectingTestCase):
dsn = ext.make_dsn(dsnin)
self.assertEqual(dsn, dsnin)
+ def test_null_args(self):
+ dsn = ext.make_dsn("dbname=foo", user="bar", password=None)
+ self.assertDsnEqual(dsn, "dbname=foo user=bar")
+
@skip_before_libpq(9, 2)
def test_url_is_cool(self):
url = 'postgresql://tester:secret@/test?application_name=wat'