File tree Expand file tree Collapse file tree
src/eligibility_signposting_api
tests/unit/services/calculators Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ def evaluate_eligibility(self) -> eligibility.EligibilityStatus:
129129 )
130130 if status .is_exclusion :
131131 actionable_flag = False
132- suppression_reasons .append (group_exclusions )
132+ suppression_reasons .extend (group_exclusions )
133133 if rule_stop :
134134 break
135135 # No exclusions - actionable
Original file line number Diff line number Diff line change @@ -51,6 +51,13 @@ def build_eligibility_response(
5151) -> eligibility .EligibilityResponse :
5252 """Return an object representing the API response we are going to send, given an evaluation of the person's
5353 eligibility."""
54+
55+ for condition in eligibility_status .conditions :
56+ for cohort_result in condition .cohort_results :
57+ for reason in cohort_result .reasons :
58+ print (f"Debug: { reason } " )
59+ print (f"Type: { type (reason )} " )
60+
5461 return eligibility .EligibilityResponse ( # pyright: ignore[reportCallIssue]
5562 response_id = uuid .uuid4 (), # pyright: ignore[reportCallIssue]
5663 meta = eligibility .Meta (last_updated = eligibility .LastUpdated (datetime .now (tz = UTC ))), # pyright: ignore[reportCallIssue]
Original file line number Diff line number Diff line change 11import datetime
2- import itertools
32
43import pytest
54from faker import Faker
@@ -889,9 +888,7 @@ def test_rules_stop_behavior(
889888 for condition in actual .conditions :
890889 if condition .condition_name == ConditionName ("RSV" ):
891890 for cohort_result in condition .cohort_results :
892- actual_reason_results .extend (
893- [reason .rule_result for reason in list (itertools .chain (* cohort_result .reasons ))]
894- )
891+ actual_reason_results .extend ([reason .rule_result for reason in cohort_result .reasons ])
895892
896893 # Then
897894 assert_that (
You can’t perform that action at this time.
0 commit comments