summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2011-11-17 21:41:50 +0000
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2011-11-17 21:51:24 +0000
commit417203f68eeecd5a460d55e0ed56cd27ad6c290d (patch)
tree3500110dd388b2593980a6372fbfc462fe1b6a61
parente18d27c4750211dd48127d3cb1f637180d12d132 (diff)
downloadpsycopg2-417203f68eeecd5a460d55e0ed56cd27ad6c290d.tar.gz
Added test to check connect() with no parameters
-rwxr-xr-xtests/test_module.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_module.py b/tests/test_module.py
index 5d45187..9c130f3 100755
--- a/tests/test_module.py
+++ b/tests/test_module.py
@@ -38,6 +38,13 @@ class ConnectTestCase(unittest.TestCase):
def tearDown(self):
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):
psycopg2.connect('')
self.assertEqual(self.args[0], '')