Changing the way checks for the error code are made.

This commit is contained in:
Niko Wenselowski
2014-01-10 10:01:17 +01:00
parent b9aa0530a8
commit 0773933cae

View File

@ -77,7 +77,7 @@ class test_MySQLdb(capabilities.DatabaseTest):
try:
self.cursor.execute("describe some_non_existent_table");
except self.connection.ProgrammingError as msg:
self.assertEquals(msg[0], ER.NO_SUCH_TABLE)
self.assertTrue(str(ER.NO_SUCH_TABLE) in str(msg))
def test_bug_3514287(self):
c = self.cursor