mirror of
https://github.com/Infinidat/infi.clickhouse_orm.git
synced 2025-02-22 19:20:36 +03:00
Python 3 compatibility
This commit is contained in:
parent
658d1da5ce
commit
86f05a0c23
|
@ -37,6 +37,7 @@ class ServerError(DatabaseException):
|
||||||
else:
|
else:
|
||||||
# just skip custom init
|
# just skip custom init
|
||||||
# if non-standard message format
|
# if non-standard message format
|
||||||
|
self.message = message
|
||||||
super(ServerError, self).__init__(message)
|
super(ServerError, self).__init__(message)
|
||||||
|
|
||||||
ERROR_PATTERN = re.compile(r'''
|
ERROR_PATTERN = re.compile(r'''
|
||||||
|
|
|
@ -162,7 +162,7 @@ class DatabaseTestCase(TestCaseWithData):
|
||||||
float_field = Float32Field()
|
float_field = Float32Field()
|
||||||
with self.assertRaises(DatabaseException) as cm:
|
with self.assertRaises(DatabaseException) as cm:
|
||||||
self.database.create_table(EnginelessModel)
|
self.database.create_table(EnginelessModel)
|
||||||
self.assertEqual(cm.exception.message, 'EnginelessModel class must define an engine')
|
self.assertEqual(str(cm.exception), 'EnginelessModel class must define an engine')
|
||||||
|
|
||||||
def test_potentially_problematic_field_names(self):
|
def test_potentially_problematic_field_names(self):
|
||||||
class Model1(Model):
|
class Model1(Model):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user