Skip to content

Commit

Permalink
fix coverage and linter error
Browse files Browse the repository at this point in the history
  • Loading branch information
saruniitr committed Jan 10, 2025
1 parent 13cdb46 commit 0b6664d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion unit_tests/caseworker/advice/views/test_bulk_approval.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,24 @@ def mock_fcdo_queue_search_data(requests_mock, fcdo_queue_id):
yield requests_mock.get(url=url, json={"results": {"cases": [], "filters": {"gov_users": []}}})


@pytest.mark.parametrize(
"cases",
(
(["54725d74-e900-43b1-b2cb-2af44ae9182d", "2468bc19-979d-4ba3-a57c-b0ce253c6237"]),
(["54725d74-e900-43b1-b2cb-2af44ae9182d"]),
),
)
def test_user_bulk_approval_success(
authorized_client,
requests_mock,
MOD_team1_user,
mod_bulk_approval_url,
mock_gov_mod_capprot_user,
mock_post_mod_bulk_approval_recommendation,
cases,
):
data = {
"cases": ["54725d74-e900-43b1-b2cb-2af44ae9182d", "2468bc19-979d-4ba3-a57c-b0ce253c6237"],
"cases": cases,
"advice": {
"text": "Approved using bulk approval",
"proviso": "",
Expand Down
2 changes: 1 addition & 1 deletion unit_tests/caseworker/queues/test_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
({"id": BULK_APPROVE_ALLOWED_QUEUES["MOD_DSR"]}, True),
({"id": BULK_APPROVE_ALLOWED_QUEUES["MOD_DSTL"]}, True),
({"id": "fake_queue"}, False),
),
),
)
def test_can_user_bulk_approve_cases(get_mock_request_user, queue, expected_result):
assert caseworker_rules.can_user_bulk_approve_cases(get_mock_request_user(None), queue) is expected_result

0 comments on commit 0b6664d

Please sign in to comment.