summaryrefslogtreecommitdiff
path: root/tests/admin_scripts
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2024-08-11 13:08:00 +0200
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2024-08-12 10:57:02 +0200
commitf883bef05457a5a49eb31109429fc01737f82532 (patch)
tree848716e2567f1d10c7a2f6c2367871579fb25c92 /tests/admin_scripts
parentf16a9a556fb4225f9094048614f4fcec3db7e067 (diff)
Refs #35591 -- Removed hardcoded "stable" version in runserver warning.
Diffstat (limited to 'tests/admin_scripts')
-rw-r--r--tests/admin_scripts/tests.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py
index 67362460a9..5ee3eeb803 100644
--- a/tests/admin_scripts/tests.py
+++ b/tests/admin_scripts/tests.py
@@ -33,7 +33,7 @@ from django.db.migrations.recorder import MigrationRecorder
from django.test import LiveServerTestCase, SimpleTestCase, TestCase, override_settings
from django.test.utils import captured_stderr, captured_stdout
from django.urls import path
-from django.utils.version import PY313
+from django.utils.version import PY313, get_docs_version
from django.views.static import serve
from . import urls
@@ -1597,11 +1597,13 @@ class ManageRunserver(SimpleTestCase):
"Starting development server at http://0.0.0.0:8000/",
self.output.getvalue(),
)
+ docs_version = get_docs_version()
self.assertIn(
"WARNING: This is a development server. Do not use it in a "
"production setting. Use a production WSGI or ASGI server instead."
"\nFor more information on production servers see: "
- "https://docs.djangoproject.com/en/stable/howto/deployment/",
+ f"https://docs.djangoproject.com/en/{docs_version}/howto/"
+ "deployment/",
self.output.getvalue(),
)
@@ -1613,11 +1615,13 @@ class ManageRunserver(SimpleTestCase):
"Starting development server at http://127.0.0.1:14437/",
self.output.getvalue(),
)
+ docs_version = get_docs_version()
self.assertIn(
"WARNING: This is a development server. Do not use it in a "
"production setting. Use a production WSGI or ASGI server instead."
"\nFor more information on production servers see: "
- "https://docs.djangoproject.com/en/stable/howto/deployment/",
+ f"https://docs.djangoproject.com/en/{docs_version}/howto/"
+ "deployment/",
self.output.getvalue(),
)
@@ -1630,11 +1634,13 @@ class ManageRunserver(SimpleTestCase):
"Starting development server at http://0.0.0.0:8000/",
self.output.getvalue(),
)
+ docs_version = get_docs_version()
self.assertNotIn(
"WARNING: This is a development server. Do not use it in a "
"production setting. Use a production WSGI or ASGI server instead."
"\nFor more information on production servers see: "
- "https://docs.djangoproject.com/en/stable/howto/deployment/",
+ f"https://docs.djangoproject.com/en/{docs_version}/howto/"
+ "deployment/",
self.output.getvalue(),
)