Added test with objects without length as callproc param

This commit is contained in:
Daniele Varrazzo 2014-06-05 02:32:53 +02:00
parent 693dedf4da
commit e076e935b9

View File

@ -427,6 +427,10 @@ class CursorTests(ConnectingTestCase):
self.assertRaises(psycopg2.InterfaceError, cur.executemany, self.assertRaises(psycopg2.InterfaceError, cur.executemany,
'select 1', []) 'select 1', [])
def test_callproc_badparam(self):
cur = self.conn.cursor()
self.assertRaises(TypeError, cur.callproc, 'lower', 42)
def test_suite(): def test_suite():
return unittest.TestLoader().loadTestsFromName(__name__) return unittest.TestLoader().loadTestsFromName(__name__)