File tree Expand file tree Collapse file tree
projects/policyengine-api-simulation Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,6 +37,8 @@ def batch_status_response(response: BudgetWindowBatchStatusResponse):
3737 return AcceptedResponse (payload )
3838 if response .status == "failed" :
3939 return ServerErrorResponse (payload )
40+ if response .status == "complete" :
41+ return JSONResponse (status_code = 200 , content = payload )
4042 return response
4143
4244
Original file line number Diff line number Diff line change @@ -733,6 +733,13 @@ def test__given_batch_state__then_poll_returns_completed_response(
733733 assert response .json ()["status" ] == "complete"
734734 assert response .json ()["result" ]["years" ] == ["2026" , "2027" ]
735735 assert "annualImpacts" not in response .json ()["result" ]
736+ output = response .json ()["result" ]["outputsByYear" ]["2026" ]
737+ assert output ["poverty_by_race" ] is None
738+ assert output ["wealth_decile" ] is None
739+ assert output ["intra_wealth_decile" ] is None
740+ assert output ["constituency_impact" ] is None
741+ assert output ["local_authority_impact" ] is None
742+ assert output ["cliff_impact" ] is None
736743 assert response .json ()["result" ]["totals" ]["budgetaryImpact" ] == 32
737744 assert response .json ()["run_id" ] == "batch-run-123"
738745
You can’t perform that action at this time.
0 commit comments