Initial commit: site monorepo with API, web, and infra.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
def test_wesp_updates_status(client):
|
||||
login = client.post(
|
||||
"/api/v1/auth/login",
|
||||
json={"email": "admin@compton.example", "password": "Admin1234"},
|
||||
)
|
||||
headers = {"Authorization": f"Bearer {login.json()['access_token']}"}
|
||||
response = client.get("/api/updates/status", headers=headers)
|
||||
assert response.status_code == 200
|
||||
body = response.json()
|
||||
assert body["update_available"] is False
|
||||
|
||||
|
||||
def test_wesp_notifications_summary(client):
|
||||
login = client.post(
|
||||
"/api/v1/auth/login",
|
||||
json={"email": "admin@compton.example", "password": "Admin1234"},
|
||||
)
|
||||
headers = {"Authorization": f"Bearer {login.json()['access_token']}"}
|
||||
response = client.get("/api/notifications?summary=1", headers=headers)
|
||||
assert response.status_code == 200
|
||||
assert response.json()["unreadCount"] == 0
|
||||
|
||||
|
||||
def test_wesp_admin_hardware_stub(client):
|
||||
login = client.post(
|
||||
"/api/v1/auth/login",
|
||||
json={"email": "admin@compton.example", "password": "Admin1234"},
|
||||
)
|
||||
headers = {"Authorization": f"Bearer {login.json()['access_token']}"}
|
||||
response = client.get("/api/admin/hardware-status", headers=headers)
|
||||
assert response.status_code == 200
|
||||
assert response.json()["status"] == "success"
|
||||
Reference in New Issue
Block a user