mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-02-07 12:50:32 +03:00
Added test to check connect() with no parameters
This commit is contained in:
parent
e18d27c475
commit
417203f68e
|
@ -38,6 +38,13 @@ class ConnectTestCase(unittest.TestCase):
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
psycopg2._connect = self._connect_orig
|
psycopg2._connect = self._connect_orig
|
||||||
|
|
||||||
|
def test_there_has_to_be_something(self):
|
||||||
|
self.assertRaises(psycopg2.InterfaceError, psycopg2.connect)
|
||||||
|
self.assertRaises(psycopg2.InterfaceError, psycopg2.connect,
|
||||||
|
connection_factory=lambda dsn, async=False: None)
|
||||||
|
self.assertRaises(psycopg2.InterfaceError, psycopg2.connect,
|
||||||
|
async=True)
|
||||||
|
|
||||||
def test_no_keywords(self):
|
def test_no_keywords(self):
|
||||||
psycopg2.connect('')
|
psycopg2.connect('')
|
||||||
self.assertEqual(self.args[0], '')
|
self.assertEqual(self.args[0], '')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user