[SQL-CVS] SQLObject/tests test_converters.py,1.2,1.3
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <dre...@us...> - 2003-07-31 14:25:35
|
Update of /cvsroot/sqlobject/SQLObject/tests In directory sc8-pr-cvs1:/tmp/cvs-serv27167/tests Modified Files: test_converters.py Log Message: More tests and converters for the SQLExpression-basec classes Index: test_converters.py =================================================================== RCS file: /cvsroot/sqlobject/SQLObject/tests/test_converters.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_converters.py 30 Jul 2003 21:07:45 -0000 1.2 --- test_converters.py 31 Jul 2003 14:25:33 -0000 1.3 *************** *** 2,6 **** from SQLObject.SQLBuilder import sqlRepr from SQLObject.SQLBuilder import SQLExpression, SQLObjectField, \ ! Select, Insert, Update, Delete, Replace from SQLObject.Converters import registerConverter --- 2,7 ---- from SQLObject.SQLBuilder import sqlRepr from SQLObject.SQLBuilder import SQLExpression, SQLObjectField, \ ! Select, Insert, Update, Delete, Replace, \ ! SQLTrueClauseClass, SQLConstant, SQLPrefix, SQLCall, SQLOp from SQLObject.Converters import registerConverter *************** *** 107,110 **** --- 108,131 ---- def test_replace(self): instance = Replace('test', {'test':'test'}) + self.assertEqual(sqlRepr(instance), repr(instance)) + + def test_trueclause(self): + instance = SQLTrueClauseClass() + self.assertEqual(sqlRepr(instance), repr(instance)) + + def test_op(self): + instance = SQLOp('and', 'this', 'that') + self.assertEqual(sqlRepr(instance), repr(instance)) + + def test_call(self): + instance = SQLCall('test', 'test') + self.assertEqual(sqlRepr(instance), repr(instance)) + + def test_constant(self): + instance = SQLConstant('test') + self.assertEqual(sqlRepr(instance), repr(instance)) + + def test_prefix(self): + instance = SQLPrefix('test', 'test') self.assertEqual(sqlRepr(instance), repr(instance)) |