Final notes [2]

This commit is contained in:
mirai
2026-01-02 23:35:20 +03:00
parent 0756aab53f
commit 8b58bf4db3
4 changed files with 6 additions and 11 deletions
+3 -3
View File
@@ -19,7 +19,7 @@ from cmd_chat.server.routes import register_routes
@pytest.fixture
def app():
name = f"test-{uuid.uuid4().hex[:8]}"
app = Sanic(name)
Extend(app)
@@ -32,10 +32,10 @@ def app():
register_routes(app)
TestManager(app)
return app
@pytest.fixture
def test_client(app):
return app.test_client
return app.test_client
+1 -4
View File
@@ -1,6 +1,3 @@
class TestHealth:
def test_health_ok(self, test_client):
@@ -11,4 +8,4 @@ class TestHealth:
assert data["status"] == "ok"
assert "messages" in data
assert "users" in data
assert "timestamp" in data
assert "timestamp" in data
+1 -1
View File
@@ -38,4 +38,4 @@ class TestSRPFlow:
"M": base64.b64encode(b"fake").decode(),
},
)
assert response.status == 401
assert response.status == 401
+1 -3
View File
@@ -1,5 +1,3 @@
class TestWebSocket:
def test_ws_connect_no_user_id(self, test_client):
@@ -9,4 +7,4 @@ class TestWebSocket:
def test_ws_connect_invalid_session(self, test_client):
_, ws = test_client.websocket("/ws/chat?user_id=invalid123")
assert ws is not None
assert ws is not None