From 1b73c764d4ec1c52e60855e97f96396a9e9e7e4c Mon Sep 17 00:00:00 2001 From: Loic Bistuer Date: Sat, 21 Feb 2015 21:44:02 +0700 Subject: [PATCH] Fixed a couple of allow_migrate routers in tests. This reverts commit 88e6fbb2e341657cb5365b9b78fb44e3c7065d2d. --- tests/commands_sql/tests.py | 3 +-- tests/multiple_database/tests.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/commands_sql/tests.py b/tests/commands_sql/tests.py index 28c584f03c..a74aab9d6a 100644 --- a/tests/commands_sql/tests.py +++ b/tests/commands_sql/tests.py @@ -92,14 +92,13 @@ class SQLCommandsTestCase(TestCase): class TestRouter(object): - def allow_migrate(self, db, model): + def allow_migrate(self, db, app_label, **hints): return False @override_settings(DATABASE_ROUTERS=[TestRouter()]) class SQLCommandsRouterTestCase(TestCase): - @ignore_warnings(category=RemovedInDjango20Warning) def test_router_honored(self): app_config = apps.get_app_config('commands_sql') for sql_command in (sql_all, sql_create, sql_delete, sql_indexes, sql_destroy_indexes): diff --git a/tests/multiple_database/tests.py b/tests/multiple_database/tests.py index 8a35fd15df..9755155bb1 100644 --- a/tests/multiple_database/tests.py +++ b/tests/multiple_database/tests.py @@ -1524,7 +1524,7 @@ class AntiPetRouter(object): # A router that only expresses an opinion on migrate, # passing pets to the 'other' database - def allow_migrate(self, db, app_label, model_name, **hints): + def allow_migrate(self, db, app_label, model_name=None, **hints): if db == 'other': return model_name == 'pet' else: