From 0f7c83f0113cb3a6bee6975462e4a077751034b5 Mon Sep 17 00:00:00 2001 From: Pawan Verma Date: Tue, 29 Oct 2024 15:02:14 +0530 Subject: [PATCH] Add missing test --- .../form_receiver/tests/test_receiver_integration.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/commcare_connect/form_receiver/tests/test_receiver_integration.py b/commcare_connect/form_receiver/tests/test_receiver_integration.py index e1e601f6..e24857da 100644 --- a/commcare_connect/form_receiver/tests/test_receiver_integration.py +++ b/commcare_connect/form_receiver/tests/test_receiver_integration.py @@ -579,7 +579,7 @@ def test_receiver_verification_flags_catchment_areas( assert ["catchment", "Visit outside worker catchment areas"] in visit.flag_reason.get("flags", []) -@pytest.mark.parametrize("opportunity", [{"opp_options": {"managed": True}}], indirect=True) +@pytest.mark.parametrize("opportunity", [{"opp_options": {"managed": True, "org_pay_per_visit": 2}}], indirect=True) @pytest.mark.parametrize( "visit_status, review_status", [ @@ -595,6 +595,11 @@ def test_receiver_visit_review_status( if visit_status != VisitValidationStatus.approved: form_json["metadata"]["location"] = None make_request(api_client, form_json, mobile_user_with_connect_link) + visit = UserVisit.objects.get(user=mobile_user_with_connect_link) + if visit_status != VisitValidationStatus.approved: + assert visit.flagged + assert visit.status == visit_status + assert visit.review_status == review_status def get_form_json_for_payment_unit(payment_unit):