File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
cads_processing_api_service Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ def compute_costing(
52
52
max_costs : dict [str , Any ] = costing_config .get ("max_costs" , {})
53
53
max_costs_exceeded = {}
54
54
for max_cost_id , max_cost_value in max_costs .items ():
55
+ max_cost_value = float (max_cost_value )
55
56
if max_cost_id in costs .keys ():
56
57
if costs [max_cost_id ] > max_cost_value :
57
58
max_costs_exceeded [max_cost_id ] = max_cost_value
Original file line number Diff line number Diff line change 16
16
17
17
import datetime
18
18
import unittest .mock
19
+ import uuid
19
20
from typing import Any
20
21
21
22
import cacholote
@@ -211,8 +212,11 @@ def test_make_pagination_query_params() -> None:
211
212
212
213
213
214
def test_dictify_job () -> None :
214
- request = cads_broker .database .SystemRequest (request_id = 0 , status = "failed" )
215
- exp_job = {"request_id" : 0 , "status" : "failed" }
215
+ request_uid = uuid .uuid4 ()
216
+ request = cads_broker .database .SystemRequest (
217
+ request_uid = request_uid , status = "failed"
218
+ )
219
+ exp_job = {"request_uid" : request_uid , "status" : "failed" }
216
220
res_job = utils .dictify_job (request )
217
221
assert isinstance (res_job , dict )
218
222
assert all ([key in res_job and res_job [key ] == exp_job [key ] for key in exp_job ])
You can’t perform that action at this time.
0 commit comments