From 811c8075ca3a402cd9ffd773ab2133a7be5cdaf9 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Wed, 15 May 2019 21:19:57 -0400 Subject: [PATCH] Skip test model tests when using MySQL MySQL doesn't support schema changes inside an atomic block. Signed-off-by: Roberto Rosario --- mayan/apps/common/tests/mixins.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mayan/apps/common/tests/mixins.py b/mayan/apps/common/tests/mixins.py index ef9475ff59..788fcc7a5d 100644 --- a/mayan/apps/common/tests/mixins.py +++ b/mayan/apps/common/tests/mixins.py @@ -284,6 +284,13 @@ class TempfileCheckTestCasekMixin(object): class TestModelTestMixin(object): def _create_test_model(self, fields=None, model_name='TestModel', options=None): + + if connection.vendor == 'mysql': + self.skipTest( + reason='MySQL doesn\t support schema changes inside an ' + 'atomic block.' + ) + # Obtain the app_config and app_label from the test's module path app_config = apps.get_containing_app_config( object_name=self.__class__.__module__