Skip to content

Commit 043bd76

Browse files
committed
added test coverage for 500 server error fix
1 parent c8d00b7 commit 043bd76

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

web/tests/test_views.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,3 +242,12 @@ def test_robots_txt_post_disallowed(self):
242242
response = self.client.post("/robots.txt")
243243

244244
self.assertEqual(HTTPStatus.METHOD_NOT_ALLOWED, response.status_code)
245+
246+
def test_api_not_found(self):
247+
"""Test if an invalid API call returns a 404 error"""
248+
url = "http://localhost:8000/api/shared/config/config.env/"
249+
response = self.client.get(url)
250+
251+
self.assertEqual(response.status_code, HTTPStatus.NOT_FOUND)
252+
253+

0 commit comments

Comments
 (0)