Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
DavisRayM committed Jan 8, 2021
1 parent f25e6a3 commit 0e93109
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions onadata/apps/api/tests/viewsets/test_data_viewset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0e93109

Please sign in to comment.