default_cache_ttl_hashed config and ?_hash= param

This commit is contained in:
Simon Willison 2019-03-17 15:41:34 -07:00
commit 8f003d9545
7 changed files with 72 additions and 21 deletions

View file

@ -59,6 +59,13 @@ def test_path_with_removed_args(path, args, expected):
)
actual = utils.path_with_removed_args(request, args)
assert expected == actual
# Run the test again but this time use the path= argument
request = Request(
"/".encode('utf8'),
{}, '1.1', 'GET', None
)
actual = utils.path_with_removed_args(request, args, path=path)
assert expected == actual
@pytest.mark.parametrize('path,args,expected', [