Update of /cvsroot/sqlobject/SQLObject/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv14756/tests
Modified Files:
SQLObjectTest.py test.py
Log Message:
Basic Sybase Support, was living in a branch for some long time. Should pass most, but not all tests
Index: SQLObjectTest.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/tests/SQLObjectTest.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** SQLObjectTest.py 1 Oct 2003 01:53:48 -0000 1.18
--- SQLObjectTest.py 4 Dec 2003 16:36:17 -0000 1.19
***************
*** 46,49 ****
--- 46,61 ----
return SQLiteConnection('data/sqlite.data')
+
+ def sybaseConnection():
+ SQLObjectTest.supportDynamic = False
+ SQLObjectTest.supportAuto = False
+ SQLObjectTest.supportRestrictedEnum = False
+ SQLObjectTest.supportTransactions = True
+ return SybaseConnection(host='localhost',
+ db='test',
+ user='sa',
+ passwd='sybasesa',
+ autoCommit=1)
+
def firebirdConnection():
SQLObjectTest.supportDynamic = True
***************
*** 54,61 ****
--- 66,75 ----
user='sysdba', passwd='masterkey')
+
_supportedDatabases = {
'mysql': 'MySQLdb',
'postgres': 'psycopg',
'sqlite': 'sqlite',
+ 'sybase': 'Sybase',
'firebird': 'kinterbasdb',
}
***************
*** 105,109 ****
elif hasattr(c, 'dropTable'):
c.dropTable(ifExists=True)
!
if hasattr(c, '%sCreate' % self.databaseName):
if not __connection__.tableExists(c._table):
--- 119,123 ----
elif hasattr(c, 'dropTable'):
c.dropTable(ifExists=True)
!
if hasattr(c, '%sCreate' % self.databaseName):
if not __connection__.tableExists(c._table):
Index: test.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/tests/test.py,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** test.py 4 Nov 2003 02:28:35 -0000 1.34
--- test.py 4 Dec 2003 16:36:17 -0000 1.35
***************
*** 225,228 ****
--- 225,229 ----
########################################
+
class DeleteSelectTest(TestCase1):
***************
*** 235,238 ****
--- 236,240 ----
self.assertEqual(list(TestSO1.select('all')), [])
+
########################################
## Transaction test
***************
*** 455,458 ****
--- 457,471 ----
"""
+ sybaseCreate = """
+ CREATE TABLE auto_test (
+ id integer,
+ first_name VARCHAR(100),
+ last_name VARCHAR(200) NOT NULL,
+ age INT DEFAULT 0,
+ created VARCHAT(40) NOT NULL,
+ happy char(1) DEFAULT 'Y' NOT NULL
+ )
+ """
+
mysqlDrop = """
DROP TABLE IF EXISTS auto_test
***************
*** 460,463 ****
--- 473,480 ----
postgresDrop = """
+ DROP TABLE auto_test
+ """
+
+ sybaseDrop = """
DROP TABLE auto_test
"""
|