More Python 3 fixes. Py 3 blows up when testing BLOBs.

This commit is contained in:
adustman
2012-09-08 21:22:53 +00:00
parent 8041cc6df6
commit 7676693b8f
4 changed files with 31 additions and 20 deletions

View File

@ -77,8 +77,8 @@ class test_MySQLdb(capabilities.DatabaseTest):
from MySQLdb.constants import ER
try:
self.cursor.execute("describe some_non_existent_table");
except self.connection.ProgrammingError as (msg,):
self.assertTrue(msg[0] == ER.NO_SUCH_TABLE)
except self.connection.ProgrammingError as msg:
self.assertTrue(msg.args[0].args[0] == ER.NO_SUCH_TABLE)
def test_bug_3514287(self):
c = self.cursor