Skip to content

Commit

Permalink
add missing test
Browse files Browse the repository at this point in the history
  • Loading branch information
Archmonger committed Sep 9, 2024
1 parent b0c8aa3 commit 54793d1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_django_whitenoise.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,3 +308,14 @@ def test_force_script_name(server, static_files, _collect_static):
response = server.get(url)
assert "/subdir" in response.url
assert response.content == static_files.js_content


@override_settings(FORCE_SCRIPT_NAME="/subdir", STATIC_URL="/subdir/static/")
def test_force_script_name_with_matching_static_url(
server, static_files, _collect_static
):
url = storage.staticfiles_storage.url(static_files.js_path)
assert url.startswith("/subdir/static/")
response = server.get(url)
assert "/subdir" in response.url
assert response.content == static_files.js_content

0 comments on commit 54793d1

Please sign in to comment.