Skip to content

Commit

Permalink
patch: update test assert results (#1052)
Browse files Browse the repository at this point in the history
* patch: update test assert results

* patch: check for observation in 2nd site
  • Loading branch information
tinashechiraya authored Jun 26, 2024
1 parent e63544e commit d63a828
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions django_project/monitor/tests/test_sites.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ def test_get_all_sites_with_observations(self):
url = reverse('sites-with-observations')
response = self.client.get(url)
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(len(response.data), 2)
self.assertEqual(len(response.data), 3)

# Check structure and content of the response
self.assertIn('site', response.data[0])
self.assertIn('observations', response.data[0])
self.assertEqual(response.data[0]['site']['gid'], self.site1.gid)
self.assertEqual(response.data[1]['site']['gid'], self.site2.gid)
self.assertIn('observations', response.data[1])
self.assertEqual(response.data[0]['site']['gid'], self.site.gid)
self.assertEqual(response.data[1]['site']['gid'], self.site1.gid)

def test_get_sites_with_observations_filtered_by_date(self):
url = reverse('sites-with-observations')
Expand Down

0 comments on commit d63a828

Please sign in to comment.