mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
parent
78b3eeaad9
commit
178b7e8749
4 changed files with 65 additions and 13 deletions
|
|
@ -386,6 +386,14 @@ def test_path_with_format(path, format, extra_qs, expected):
|
|||
assert expected == actual
|
||||
|
||||
|
||||
def test_path_with_format_replace_format():
|
||||
request = Request.fake("/foo/bar.csv")
|
||||
assert utils.path_with_format(request, "blob") == "/foo/bar.csv?_format=blob"
|
||||
assert (
|
||||
utils.path_with_format(request, "blob", replace_format="csv") == "/foo/bar.blob"
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"bytes,expected",
|
||||
[
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue