"""Payment group tests.""" from unittest.mock import call, patch from owsresponse import response @patch('abacus_account.blueprints.payment_group.logic') def test_get_payment_group_eligible_accounts( mock_logic, fixture_client ): """Test get payment group eligible accounts.""" payment_group_id = 1 mock_result = [{'test_key': 'test_value'}] mock_logic.get_payment_group_eligible_accounts.return_value = response.Response([ {'test_key': 'test_value'} ]) res = fixture_client.get(f'/payment-group/{payment_group_id}/eligible-accounts') assert res.status_code == 200 assert res.json == mock_result assert mock_logic.get_payment_group_eligible_accounts.call_args_list == [ call(1) ]