Replaced migration state render() by apps cached property

Refs #23745.
This commit is contained in:
Claude Paroz 2014-11-05 10:43:31 +01:00
parent 4ee06ec3fc
commit a159b1facd
9 changed files with 140 additions and 162 deletions

View file

@ -219,7 +219,7 @@ class ExecutorTests(MigrationTestBase):
# exists in the global app registry temporarily.
old_table_names = connection.introspection.table_names
connection.introspection.table_names = lambda c: [x for x in old_table_names(c) if x != "auth_user"]
migrations_apps = executor.loader.project_state(("migrations", "0001_initial")).render()
migrations_apps = executor.loader.project_state(("migrations", "0001_initial")).apps
global_apps.get_app_config("migrations").models["author"] = migrations_apps.get_model("migrations", "author")
try:
migration = executor.loader.get_migration("auth", "0001_initial")