diff --git a/tests/fixtures.py b/tests/fixtures.py index 1978bcc..cb0c27e 100644 --- a/tests/fixtures.py +++ b/tests/fixtures.py @@ -23,3 +23,4 @@ ADD_NOT_NULL_COLUMN_FOLLOWED_BY_DEFAULT = "app_add_not_null_column_followed_by_d ALTER_COLUMN = "app_alter_column" ALTER_COLUMN_DROP_NOT_NULL = "app_alter_column_drop_not_null" DROP_UNIQUE_TOGETHER = "app_unique_together" +ADD_MANYTOMANY_FIELD = "app_add_manytomany_field" diff --git a/tests/functional/test_migration_linter.py b/tests/functional/test_migration_linter.py index ef966f1..17066f2 100644 --- a/tests/functional/test_migration_linter.py +++ b/tests/functional/test_migration_linter.py @@ -93,6 +93,10 @@ class BaseBackwardCompatibilityDetection(object): app = fixtures.ALTER_COLUMN_DROP_NOT_NULL self._test_linter_finds_no_errors(app) + def test_accept_adding_manytomany_field(self): + app = fixtures.ADD_MANYTOMANY_FIELD + self._test_linter_finds_no_errors(app) + def test_with_git_ref(self): self._test_linter_finds_errors(commit_id="v0.1.4") diff --git a/tests/test_project/settings.py b/tests/test_project/settings.py index 89c66fb..a221a97 100644 --- a/tests/test_project/settings.py +++ b/tests/test_project/settings.py @@ -40,6 +40,7 @@ INSTALLED_APPS = [ "django.contrib.messages", "django.contrib.staticfiles", "django_migration_linter", + "tests.test_project.app_add_manytomany_field", "tests.test_project.app_add_not_null_column", "tests.test_project.app_add_not_null_column_followed_by_default", "tests.test_project.app_alter_column",