.add_message() now works inside plugins, closes #864

Refs #870
This commit is contained in:
Simon Willison 2020-06-28 17:25:35 -07:00
commit 7ac4936cec
4 changed files with 32 additions and 17 deletions

View file

@ -602,6 +602,14 @@ def test_register_routes_asgi(app_client):
assert "1" == response.headers["x-three"]
def test_register_routes_add_message(app_client):
response = app_client.get("/add-message/")
assert 200 == response.status
assert "Added message" == response.text
decoded = app_client.ds.unsign(response.cookies["ds_messages"], "messages")
assert [["Hello from messages", 1]] == decoded
@pytest.mark.asyncio
async def test_startup(app_client):
await app_client.ds.invoke_startup()