We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0aa9566 + b0b6db2 commit 436a440Copy full SHA for 436a440
1 file changed
tests/test_routes.py
@@ -28,6 +28,17 @@ def read_file_v1(self, state):
28
expected_json_output = file.read()
29
return expected_json_output
30
31
+ def test_root_api(self, mock_request_get, mock_datetime):
32
+ """Validate redirections of /"""
33
+ mock_datetime.utcnow.return_value.isoformat.return_value = self.date
34
+ mock_datetime.strptime.side_effect = mocked_strptime_isoformat
35
+ return_data = self.client.get("/")
36
+
37
+ assert return_data.status_code == 302
38
39
+ assert dict(return_data.headers)["Location"] == \
40
+ "https://github.com/ExpDev07/coronavirus-tracker-api"
41
42
def test_v1_confirmed(self, mock_request_get, mock_datetime):
43
mock_datetime.utcnow.return_value.isoformat.return_value = self.date
44
mock_datetime.strptime.side_effect = mocked_strptime_isoformat
0 commit comments