8
class ConnectionTests(unittest.TestCase):
11
return psycopg2.connect(tests.dsn)
13
def test_closed_attribute(self):
15
self.assertEqual(conn.closed, False)
17
self.assertEqual(conn.closed, True)
19
def test_cursor_closed_attribute(self):
22
self.assertEqual(curs.closed, False)
24
self.assertEqual(curs.closed, True)
26
# Closing the connection closes the cursor:
29
self.assertEqual(curs.closed, True)
33
return unittest.TestLoader().loadTestsFromName(__name__)