Commit f639178c authored by Sebastien Robin's avatar Sebastien Robin

add test to check sql queries ending with ';'

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37758 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d93785c4
...@@ -4331,9 +4331,12 @@ VALUES ...@@ -4331,9 +4331,12 @@ VALUES
self.assertTrue(int(person.uid)) self.assertTrue(int(person.uid))
self.assertEqual(person.uid, assignment.getParentUid()) self.assertEqual(person.uid, assignment.getParentUid())
def test_queriesEndingWithSemicolon(self, quiet=quiet):
connector = self.getPortal().erp5_sql_connection
result = connector.manage_test('select 1 as foo;')
self.assertEquals(1, result[0].foo)
def test_suite(): def test_suite():
suite = unittest.TestSuite() suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestERP5Catalog)) suite.addTest(unittest.makeSuite(TestERP5Catalog))
return suite return suite
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment