-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* patch: modify test * patch: update view to return 404 as json
- Loading branch information
1 parent
52975aa
commit fa97e2a
Showing
2 changed files
with
8 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -440,13 +440,10 @@ def test_observations_by_site_id(self): | |
self.assertEqual(response['Content-Type'], 'application/json') | ||
|
||
def test_observations_by_nonexistent_site_id(self): | ||
self.client.login(email='[email protected]', password='testuserpassword') | ||
|
||
url = reverse('observations-by-site', kwargs={'site_id': 999}) | ||
|
||
# Check if the Sites.DoesNotExist exception is raised | ||
with self.assertRaises(Sites.DoesNotExist): | ||
self.client.get(url) | ||
self.client.login(email='[email protected]', password='testuserpassword') | ||
url = reverse('observations-by-site', kwargs={'site_id': 999}) | ||
response = self.client.get(url) | ||
self.assertEqual(response.status_code, 404) | ||
|
||
def test_expert_auto_validated_observation(self): | ||
""" | ||
|