Fix for row pages for tables with / in, closes #325

This commit is contained in:
Simon Willison 2018-07-07 22:21:51 -07:00
commit 6541ce633e
No known key found for this signature in database
GPG key ID: 17E2DEA2588B7F52
4 changed files with 34 additions and 2 deletions

View file

@ -56,6 +56,19 @@ def test_row(app_client):
assert response.status == 200
def test_row_strange_table_name(app_client):
response = app_client.get(
'/fixtures/table%2Fwith%2Fslashes.csv/3',
allow_redirects=False
)
assert response.status == 302
assert response.headers['Location'].endswith(
'/table%2Fwith%2Fslashes.csv/3'
)
response = app_client.get('/fixtures/table%2Fwith%2Fslashes.csv/3')
assert response.status == 200
def test_add_filter_redirects(app_client):
filter_args = urllib.parse.urlencode({
'_filter_column': 'content',