mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
parent
d392dc1cfa
commit
f5e79adf26
9 changed files with 129 additions and 4 deletions
|
|
@ -544,3 +544,18 @@ def test_actor_json(app_client):
|
|||
assert {"actor": {"id": "bot2", "1+1": 2}} == app_client.get(
|
||||
"/-/actor.json/?_bot2=1"
|
||||
).json
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"path,body", [("/one/", "2"), ("/two/Ray?greeting=Hail", "Hail Ray"),]
|
||||
)
|
||||
def test_register_routes(app_client, path, body):
|
||||
response = app_client.get(path)
|
||||
assert 200 == response.status
|
||||
assert body == response.text
|
||||
|
||||
|
||||
def test_register_routes_asgi(app_client):
|
||||
response = app_client.get("/three/")
|
||||
assert {"hello": "world"} == response.json
|
||||
assert "1" == response.headers["x-three"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue