From 492e9012cb9cad291c5dcf9a9d3c625cc3e24d59 Mon Sep 17 00:00:00 2001 From: Melyns <60199831+Melyns@users.noreply.github.com> Date: Thu, 12 Sep 2024 21:40:24 +0100 Subject: [PATCH] Update test.py --- .github/test.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/test.py b/.github/test.py index f3afe2e..b3caee8 100644 --- a/.github/test.py +++ b/.github/test.py @@ -11,18 +11,25 @@ def test_index(): response = client.get("/") assert response.status_code == 200 - assert "Welcome" in response.text + assert "Schizo Bots" in response.text + assert '' in response.text + assert '' in response.text def test_new_chat(): + # Ensure the chat is not paused before starting a new chat + client.post("/pause") + response = client.post("/new-chat") assert response.status_code == 200 assert response.json() == {"status": "new chat started"} def test_pause(): + # Check initial pause state response = client.post("/pause") assert response.status_code == 200 assert response.json()["paused"] is True + # Toggle pause state back to False response = client.post("/pause") assert response.status_code == 200 assert response.json()["paused"] is False