File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
diracx-routers/tests/pilots Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 66from diracx .routers .utils .users import AuthSettings
77
88pytestmark = pytest .mark .enabled_dependencies (
9- ["AuthSettings" , "PilotAgentsDB" , "PilotLogsDB" ]
9+ [
10+ "AuthSettings" ,
11+ "PilotAgentsDB" ,
12+ "PilotLogsDB" ,
13+ "PilotLogsAccessPolicy" ,
14+ "DevelopmentSettings" ,
15+ ]
1016)
1117
1218
@@ -49,3 +55,9 @@ async def test_send_and_retrieve_logs(
4955 r = normal_user_client .post ("/api/pilots/" , json = msg_dict )
5056
5157 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 " )
You can’t perform that action at this time.
0 commit comments