1515# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717#
18- # $Id: test_postgresql.py,v 1.1 2003-10-25 22:53:26 richard Exp $
18+ # $Id: test_postgresql.py,v 1.2 2003-10-26 14:43:51 jlgijsbers Exp $
1919
2020import unittest , os , shutil , time
2121
2727from roundup import backends
2828
2929class postgresqlOpener :
30- if hasattr (backends , 'metakit ' ):
30+ if hasattr (backends , 'postgresql ' ):
3131 from roundup .backends import postgresql as module
3232
3333 def tearDown (self ):
@@ -55,7 +55,7 @@ def test_suite():
5555 try :
5656 # Check if we can run postgresql tests
5757 import psycopg
58- db = psycopg .Database (nodbconfig , 'admin' )
58+ db = postgresql .Database (nodbconfig , 'admin' )
5959 db .conn .select_db (config .POSTGRESQL_DBNAME )
6060 db .sql ("SHOW TABLES" );
6161 tables = db .sql_fetchall ()
@@ -66,7 +66,7 @@ def test_suite():
6666 db .sql ("DROP DATABASE %s" % config .POSTGRESQL_DBNAME )
6767 db .sql ("CREATE DATABASE %s" % config .POSTGRESQL_DBNAME )
6868 db .close ()
69- except (MySQLdb .ProgrammingError , DatabaseError ), msg :
69+ except (psycopg .ProgrammingError , DatabaseError ), msg :
7070 print "Skipping postgresql tests (%s)" % msg
7171 else :
7272 print 'Including postgresql tests'
0 commit comments