summaryrefslogtreecommitdiff
path: root/test/dialect/postgresql/test_dialect.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/dialect/postgresql/test_dialect.py')
-rw-r--r--test/dialect/postgresql/test_dialect.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/dialect/postgresql/test_dialect.py b/test/dialect/postgresql/test_dialect.py
index 43c5aea21..8ee5a6e2f 100644
--- a/test/dialect/postgresql/test_dialect.py
+++ b/test/dialect/postgresql/test_dialect.py
@@ -159,6 +159,25 @@ class DialectTest(fixtures.TestBase):
eq_(cargs, [])
eq_(cparams, {"host": "somehost", "any_random_thing": "yes"})
+ def test_psycopg2_nonempty_connection_string_w_query_two(self):
+ dialect = psycopg2_dialect.dialect()
+ url_string = "postgresql://USER:PASS@/DB?host=hostA"
+ u = url.make_url(url_string)
+ cargs, cparams = dialect.create_connect_args(u)
+ eq_(cargs, [])
+ eq_(cparams["host"], "hostA")
+
+ def test_psycopg2_nonempty_connection_string_w_query_three(self):
+ dialect = psycopg2_dialect.dialect()
+ url_string = (
+ "postgresql://USER:PASS@/DB"
+ "?host=hostA:portA&host=hostB&host=hostC"
+ )
+ u = url.make_url(url_string)
+ cargs, cparams = dialect.create_connect_args(u)
+ eq_(cargs, [])
+ eq_(cparams["host"], "hostA:portA,hostB,hostC")
+
class ExecuteManyMode(object):
__only_on__ = "postgresql+psycopg2"