X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=psycopg2%2Ftests%2Ftest_psycopg2_dbapi20.py;fp=psycopg2%2Ftests%2Ftest_psycopg2_dbapi20.py;h=028b718cb5e7155e8790b8a3e2c85e840a2290a5;hb=e5bdc26e1423689c0ab3204931335787737946ea;hp=0000000000000000000000000000000000000000;hpb=f8dd312990da7cc744e1c148bfd395c18492f3f1;p=plcapi.git diff --git a/psycopg2/tests/test_psycopg2_dbapi20.py b/psycopg2/tests/test_psycopg2_dbapi20.py new file mode 100644 index 0000000..028b718 --- /dev/null +++ b/psycopg2/tests/test_psycopg2_dbapi20.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python +import dbapi20 +import unittest +import psycopg2 +import popen2 + +class test_Psycopg(dbapi20.DatabaseAPI20Test): + driver = psycopg2 + connect_args = () + connect_kw_args = {'dsn': 'dbname=dbapi20_test'} + + lower_func = 'lower' # For stored procedure test + + def setUp(self): + # Call superclass setUp In case this does something in the + # future + dbapi20.DatabaseAPI20Test.setUp(self) + + try: + con = self._connect() + con.close() + except: + cmd = "psql -c 'create database dbapi20_test' template1" + cout,cin = popen2.popen2(cmd) + cin.close() + cout.read() + + def tearDown(self): + dbapi20.DatabaseAPI20Test.tearDown(self) + + def test_nextset(self): pass + def test_setoutputsize(self): pass + +if __name__ == '__main__': + unittest.main()