mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Fix for redirects ignoring base_url, refs #1883
This commit is contained in:
parent
bbaab3b38e
commit
8d9a957c63
2 changed files with 20 additions and 8 deletions
|
|
@ -801,6 +801,16 @@ def test_base_url_config(app_client_base_url_prefix, path, use_prefix):
|
|||
)
|
||||
|
||||
|
||||
def test_base_url_affects_filter_redirects(app_client_base_url_prefix):
|
||||
path = "/fixtures/binary_data?_filter_column=rowid&_filter_op=exact&_filter_value=1&_sort=rowid"
|
||||
response = app_client_base_url_prefix.get(path)
|
||||
assert response.status == 302
|
||||
assert (
|
||||
response.headers["location"]
|
||||
== "/prefix/fixtures/binary_data?_sort=rowid&rowid__exact=1"
|
||||
)
|
||||
|
||||
|
||||
def test_base_url_affects_metadata_extra_css_urls(app_client_base_url_prefix):
|
||||
html = app_client_base_url_prefix.get("/").text
|
||||
assert '<link rel="stylesheet" href="/prefix/static/extra-css-urls.css">' in html
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue