5
5
6
6
from atmosphere .custom_activity .server import server
7
7
8
+ import json
9
+
8
10
9
11
@fixture (name = "default_prediction" )
10
12
def fixture_default_prediction ():
@@ -15,7 +17,7 @@ def fixture_default_prediction():
15
17
"id" : "c22d6e7a-fd33-4f60-8e5a-0a0ab9bb1da1" ,
16
18
"name" : "kana activity" ,
17
19
"description" : "Kana mock activity" ,
18
- "start_date" : "2020-11-06T03:17:29.600944+00:00 " ,
20
+ "start_date" : "2020-11-06T03:17:29.600944Z " ,
19
21
"end_date" : None ,
20
22
"status" : "running" ,
21
23
"current_category" : "deployment" ,
@@ -26,7 +28,7 @@ def fixture_default_prediction():
26
28
"name" : "kana" ,
27
29
"description" : "Kana mock" ,
28
30
"category" : "deployment" ,
29
- "start_date" : "2020-11-06T03:17:29.600944+00:00 " ,
31
+ "start_date" : "2020-11-06T03:17:29.600944Z " ,
30
32
"end_date" : None ,
31
33
"status" : "running" ,
32
34
},
@@ -84,15 +86,12 @@ def test_get_prediction_response_payload_formats(test_client: TestClient):
84
86
def test_format_prediction_payload_response (
85
87
test_client : TestClient , default_prediction : dict
86
88
):
87
- resp = test_client .post (
88
- "/format-prediction-payload-response" ,
89
+ resp = test_client .request (
90
+ method = "post" ,
91
+ url = "/format-prediction-payload-response" ,
89
92
params = {"payload_format" : "test" },
90
93
json = default_prediction ,
91
94
)
92
- print ("resp.json:::::::::::::::" )
93
- print (resp .json ())
94
- print ("default_prediction::::::" )
95
- print (default_prediction )
96
95
assert resp .status_code == 200
97
96
assert resp .json () == default_prediction
98
97
0 commit comments