We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fa431ca commit be8c9bbCopy full SHA for be8c9bb
1 file changed
diracx-routers/tests/pilots/test_pilot_logger.py
@@ -6,7 +6,13 @@
6
from diracx.routers.utils.users import AuthSettings
7
8
pytestmark = pytest.mark.enabled_dependencies(
9
- ["AuthSettings", "PilotAgentsDB", "PilotLogsDB"]
+ [
10
+ "AuthSettings",
11
+ "PilotAgentsDB",
12
+ "PilotLogsDB",
13
+ "PilotLogsAccessPolicy",
14
+ "DevelopmentSettings",
15
+ ]
16
)
17
18
@@ -49,3 +55,9 @@ async def test_send_and_retrieve_logs(
49
55
r = normal_user_client.post("/api/pilots/", json=msg_dict)
50
56
51
57
assert r.status_code == 200, r.text
58
+ # it just returns the pilot id corresponding for pilot stamp.
59
+ assert r.json() == 1
60
+ # get the message back:
61
+ r = normal_user_client.get("/api/pilots/logs?pilot_id=1")
62
+ assert r.status_code == 200, r.text
63
+ assert [next(iter(d.values())) for d in r.json()] == msg.split("\n")
0 commit comments