Merge remote-tracking branch 'origin/pycurl' into planetlab-4_0-branch
[plcapi.git] / trunk / psycopg2 / tests / test_psycopg2_dbapi20.py
1 #!/usr/bin/env python
2 import dbapi20
3 import unittest
4 import psycopg2
5 import popen2
6
7 class test_Psycopg(dbapi20.DatabaseAPI20Test):
8     driver = psycopg2
9     connect_args = ()
10     connect_kw_args = {'dsn': 'dbname=dbapi20_test'}
11
12     lower_func = 'lower' # For stored procedure test
13
14     def setUp(self):
15         # Call superclass setUp In case this does something in the
16         # future
17         dbapi20.DatabaseAPI20Test.setUp(self) 
18
19         try:
20             con = self._connect()
21             con.close()
22         except:
23             cmd = "psql -c 'create database dbapi20_test' template1"
24             cout,cin = popen2.popen2(cmd)
25             cin.close()
26             cout.read()
27
28     def tearDown(self):
29         dbapi20.DatabaseAPI20Test.tearDown(self)
30
31     def test_nextset(self): pass
32     def test_setoutputsize(self): pass
33
34 if __name__ == '__main__':
35     unittest.main()