def test_call_passes_group_service(self, pyramid_request, nipsa_filter, group_service): f = search.Filter(pyramid_request) f({}) nipsa_filter.assert_called_once_with(group_service, mock.ANY)
def test_call_passes_request_user(self, pyramid_request, nipsa_filter): f = search.Filter(pyramid_request) f({}) nipsa_filter.assert_called_once_with(mock.ANY, pyramid_request.user)
def test_call_returns_nipsa_filter(self, pyramid_request, nipsa_filter): f = search.Filter(pyramid_request) assert f({}) == nipsa_filter.return_value