split tests into multiple files

This commit is contained in:
hyperbel 2023-07-05 02:59:19 +02:00
parent 54f2b5b310
commit aa5258b281
4 changed files with 46 additions and 43 deletions

14
tests/test_chat.py Normal file
View File

@ -0,0 +1,14 @@
from tests import client, app
class TestChat:
def test_api_chat(self, client):
response = client.get("/api/chat/")
assert response.status_code == 200
def test_api_chat_messages_1(self, client):
response = client.get("/api/chat/messages/1")
assert response.status_code == 200
def test_api_chat_new_message(self, client):
response = client.post("/api/chat/new_message")
assert response.status_code == 200

14
tests/test_mate.py Normal file
View File

@ -0,0 +1,14 @@
from tests import client, app
class TestMate:
def test_api_mate(self, client):
response = client.get("/api/mate")
assert response.status_code == 200
def test_api_mate_status(self, client):
response = client.get("/api/mate/status")
assert response.status_code == 200
def test_api_mate_trinken(self, client):
response = client.post("/api/mate/trinken")
assert response.status_code == 200

18
tests/test_music.py Normal file
View File

@ -0,0 +1,18 @@
from tests import client, app
class TestMusic:
def test_api_music(self, client):
response = client.get("/api/music")
assert response.status_code == 200
def test_api_music_skip(self, client):
response = client.post("/api/music/skip")
assert response.status_code == 200
def test_api_music_queue(self, client):
response = client.get("/api/music/queue")
assert response.status_code == 200
def test_api_music_add_song(self, client):
response = client.post("/api/music/add_song")
assert response.status_code == 200

View File

@ -9,46 +9,3 @@ class TestServer:
response = client.get("/api")
assert response.status_code == 200
def test_api_mate(self, client):
response = client.get("/api/mate")
assert response.status_code == 200
def test_api_mate_status(self, client):
response = client.get("/api/mate/status")
assert response.status_code == 200
def test_api_mate_trinken(self, client):
response = client.post("/api/mate/trinken")
assert response.status_code == 200
def test_api_chat(self, client):
response = client.get("/api/chat/")
assert response.status_code == 200
def test_api_chat_messages_1(self, client):
response = client.get("/api/chat/messages/1")
assert response.status_code == 200
def test_api_chat_messages_2(self, client):
response = client.get("/api/chat/messages/1/1")
assert response.status_code == 200
def test_api_chat_new_message(self, client):
response = client.post("/api/chat/new_message")
assert response.status_code == 200
def test_api_music(self, client):
response = client.get("/api/music")
assert response.status_code == 200
def test_api_music_skip(self, client):
response = client.post("/api/music/skip")
assert response.status_code == 200
def test_api_music_queue(self, client):
response = client.get("/api/music/queue")
assert response.status_code == 200
def test_api_music_add_song(self, client):
response = client.post("/api/music/add_song")
assert response.status_code == 200