1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Simplified register_models.

Since it's never called with more than one model at a time the current
signature is needlessly complicated.
This commit is contained in:
Aymeric Augustin
2013-12-13 21:29:30 +01:00
parent e85932b54e
commit ebda5800ae
4 changed files with 35 additions and 30 deletions

View File

@@ -151,7 +151,7 @@ class MakeMigrationsTests(MigrationTestBase):
def test_files_content(self):
self.assertTableNotExists("migrations_unicodemodel")
app_cache.register_models('migrations', UnicodeModel)
app_cache.register_model('migrations', UnicodeModel)
with override_settings(MIGRATION_MODULES={"migrations": self.migration_pkg}):
call_command("makemigrations", "migrations", verbosity=0)
@@ -187,7 +187,7 @@ class MakeMigrationsTests(MigrationTestBase):
def test_failing_migration(self):
#21280 - If a migration fails to serialize, it shouldn't generate an empty file.
app_cache.register_models('migrations', UnserializableModel)
app_cache.register_model('migrations', UnserializableModel)
with six.assertRaisesRegex(self, ValueError, r'Cannot serialize'):
with override_settings(MIGRATION_MODULES={"migrations": self.migration_pkg}):