Refs #29548 -- Fixed non-GIS test failures on MariaDB.

This commit is contained in:
Tom Forbes 2018-07-09 19:59:42 +01:00 committed by Tim Graham
parent 7d6fe18dde
commit 45c035c823
3 changed files with 20 additions and 3 deletions

View file

@ -22,11 +22,13 @@ class TestFeatures(TestCase):
def test_skip_locked_no_wait(self):
with mock.MagicMock() as _connection:
_connection.mysql_version = (8, 0, 1)
_connection.mysql_is_mariadb = False
database_features = DatabaseFeatures(_connection)
self.assertTrue(database_features.has_select_for_update_skip_locked)
self.assertTrue(database_features.has_select_for_update_nowait)
with mock.MagicMock() as _connection:
_connection.mysql_version = (8, 0, 0)
_connection.mysql_is_mariadb = False
database_features = DatabaseFeatures(_connection)
self.assertFalse(database_features.has_select_for_update_skip_locked)
self.assertFalse(database_features.has_select_for_update_nowait)