def test_filter_by_query_param(qs): qs.filter.return_value = qs qs = filter_by_query_param(qs, "test", ["name", "force"]) test_kwargs = {"name__icontains": "test", "force__icontains": "test"} q_objects = Q() for q in test_kwargs: q_objects |= Q(**{q: test_kwargs[q]}) # FIXME: django 1.11 fails on called_once_with(q_objects) qs.filter.call_count == 1
def test_filter_by_query_param(qs): qs.filter.return_value = qs qs = filter_by_query_param(qs, "test", ["name", "force"]) test_kwargs = {"name__icontains": "test", "force__icontains": "test"} q_objects = Q() for q in test_kwargs: q_objects |= Q(**{q: test_kwargs[q]}) # FIXME: django 1.11 fails on called_once_with(q_objects) qs.filter.call_count == 1
def test_filter_by_query_param(qs): qs.filter.return_value = qs qs = filter_by_query_param(qs, 'test', ['name', 'force']) test_kwargs = {'name__icontains': 'test', 'force__icontains': 'test'} q_objects = Q() for q in test_kwargs: q_objects |= Q(**{q: test_kwargs[q]}) # FIXME: django 1.11 fails on called_once_with(q_objects) qs.filter.call_count == 1
def test_filter_by_query_param(qs): qs.filter.return_value = qs qs = filter_by_query_param(qs, 'test', ['name', 'force']) test_kwargs = {'name__icontains': 'test', 'force__icontains': 'test'} q_objects = Q() for q in test_kwargs: q_objects |= Q(**{q: test_kwargs[q]}) # FIXME: django 1.11 fails on called_once_with(q_objects) qs.filter.call_count == 1