[4.1.x] Fixed #33887 -- Fixed test_fails_squash_migration_manual_porting() on final tags.
Regression in7c318a8bdd
. Backport of4e13b40a76
from main
This commit is contained in:
parent
a9268e3225
commit
9e9bdf8dbd
|
@ -3005,11 +3005,12 @@ class OptimizeMigrationTests(MigrationTestBase):
|
||||||
with self.temporary_migration_module(
|
with self.temporary_migration_module(
|
||||||
module="migrations.test_migrations_manual_porting"
|
module="migrations.test_migrations_manual_porting"
|
||||||
) as migration_dir:
|
) as migration_dir:
|
||||||
|
version = get_docs_version()
|
||||||
msg = (
|
msg = (
|
||||||
"Migration will require manual porting but is already a squashed "
|
f"Migration will require manual porting but is already a squashed "
|
||||||
"migration.\nTransition to a normal migration first: "
|
f"migration.\nTransition to a normal migration first: "
|
||||||
"https://docs.djangoproject.com/en/dev/topics/migrations/"
|
f"https://docs.djangoproject.com/en/{version}/topics/migrations/"
|
||||||
"#squashing-migrations"
|
f"#squashing-migrations"
|
||||||
)
|
)
|
||||||
with self.assertRaisesMessage(CommandError, msg):
|
with self.assertRaisesMessage(CommandError, msg):
|
||||||
call_command("optimizemigration", "migrations", "0004", stdout=out)
|
call_command("optimizemigration", "migrations", "0004", stdout=out)
|
||||||
|
|
Loading…
Reference in New Issue