From 9e9bdf8dbd6e2354a2e23aa7e37d5b491338085e Mon Sep 17 00:00:00 2001 From: Alberto Planas Date: Wed, 3 Aug 2022 16:36:04 +0200 Subject: [PATCH] [4.1.x] Fixed #33887 -- Fixed test_fails_squash_migration_manual_porting() on final tags. Regression in 7c318a8bdd66f8c5241864c9970dddb525d0ca4c. Backport of 4e13b40a764cfdae50416338c5d077e9d9a6d0f1 from main --- tests/migrations/test_commands.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/migrations/test_commands.py b/tests/migrations/test_commands.py index a3e1efc924bd..0d4fb52bbb82 100644 --- a/tests/migrations/test_commands.py +++ b/tests/migrations/test_commands.py @@ -3005,11 +3005,12 @@ def test_fails_squash_migration_manual_porting(self): with self.temporary_migration_module( module="migrations.test_migrations_manual_porting" ) as migration_dir: + version = get_docs_version() msg = ( - "Migration will require manual porting but is already a squashed " - "migration.\nTransition to a normal migration first: " - "https://docs.djangoproject.com/en/dev/topics/migrations/" - "#squashing-migrations" + f"Migration will require manual porting but is already a squashed " + f"migration.\nTransition to a normal migration first: " + f"https://docs.djangoproject.com/en/{version}/topics/migrations/" + f"#squashing-migrations" ) with self.assertRaisesMessage(CommandError, msg): call_command("optimizemigration", "migrations", "0004", stdout=out)