diff --git a/onadata/apps/api/tests/viewsets/test_data_viewset.py b/onadata/apps/api/tests/viewsets/test_data_viewset.py index 74a3815386..b15770600f 100644 --- a/onadata/apps/api/tests/viewsets/test_data_viewset.py +++ b/onadata/apps/api/tests/viewsets/test_data_viewset.py @@ -2391,6 +2391,17 @@ def test_data_query_multiple_condition(self): self.assertEqual(response.status_code, 200) self.assertEqual(len(response.data), count) + query_str = ( + '{"$or":[{"transport/loop_over_transport_types_frequency' + '/ambulance/frequency_to_referral_facility":"weekly"}, {"t' + 'ransport/loop_over_transport_types_frequency/ambulanc' + 'e/frequency_to_referral_facility":"daily"}]}' + ) + request = self.factory.get(f'/?query={query_str}', **self.extra) + response = view(request, pk=self.xform.pk) + self.assertEqual(response.status_code, 200) + self.assertEqual(len(response.data), count) + def test_data_query_ornull(self): """ Test that a user is able to query for null with the