适应接口更改

This commit is contained in:
高子兴 2024-11-20 22:08:54 +08:00
parent b2fbe2cf4a
commit 4cf43c75d9

View File

@ -69,7 +69,7 @@ class TestLoginReg(unittest.TestCase):
# 发送登录请求
response = client.post("/api/s1/login", json={"username": "testuser", "password": "testpassword"})
self.assertEqual(response.status_code, 200)
self.assertEqual(response.json(), {"message": "Login successful"})
self.assertEqual(response.json(), {'message': 'Login successful', 'role': 1})
def test_register(self):
# 发送注册请求