There was an error while loading. Please reload this page.
2 parents 0e728a8 + b0ce893 commit 7d9dcecCopy full SHA for 7d9dcec
1 file changed
codespeed/tests/tests_api.py
@@ -83,6 +83,9 @@ def test_post(self):
83
for k, v in self.env2_data.items():
84
self.assertEqual(
85
json.loads(response.content)[k], v)
86
+ response = self.client.delete('/api/v1/environment/3/',
87
+ content_type='application/json')
88
+ self.assertEquals(response.status_code, 204)
89
90
def test_put(self):
91
"""Should modify an existing environment"""
@@ -230,6 +233,10 @@ def test_delete(self):
230
233
231
234
response = self.client.get('/api/v1/executable/{0}/'.format(
232
235
self.executable.id,))
236
+
237
+ def test_nonexistent(self):
238
+ """Requesting an environment that doesn't exist should return a 404"""
239
+ response = self.client.get('/api/v1/environment/3333333/')
240
self.assertEquals(response.status_code, 404)
241
242
0 commit comments