Test that the empty dsn is a valid make_dsn input

This commit is contained in:
Daniele Varrazzo 2016-03-03 16:09:33 +00:00
parent 6893295a87
commit 7155d06cdc

View File

@ -384,6 +384,10 @@ class MakeDsnTestCase(ConnectingTestCase):
def test_there_has_to_be_something(self):
self.assertRaises(TypeError, ext.make_dsn)
def test_empty_string(self):
dsn = ext.make_dsn('')
self.assertEqual(dsn, '')
def test_empty_param(self):
dsn = ext.make_dsn(database='sony', password='')
self.assertDsnEqual(dsn, "dbname=sony password=''")