summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/migrations/test_commands.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/migrations/test_commands.py b/tests/migrations/test_commands.py
index 3c98ddd8db..61a914f8ce 100644
--- a/tests/migrations/test_commands.py
+++ b/tests/migrations/test_commands.py
@@ -3107,11 +3107,12 @@ class OptimizeMigrationTests(MigrationTestBase):
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)