|
5 | 5 |
|
6 | 6 | class EndpointTesttest_s(unittest.TestCase): |
7 | 7 | def test_is_service_available(self): |
8 | | - response = self.__get_robot_webservice("/status") |
| 8 | + self.__get_robot_webservice("/status", expected_response_code=200) |
9 | 9 |
|
10 | | - def test_is_robottask_startable(self): |
| 10 | + def test_is_all_robottask_startable(self): |
11 | 11 | response = self.__get_robot_webservice( |
12 | | - "/robotframework/run/all", expected_response_code=400 |
| 12 | + "/robotframework/run/all", expected_response_code=500 |
13 | 13 | ) |
14 | 14 | self.__is_robot_failed(response=response) |
15 | 15 |
|
16 | | - def test_is_robottask_async_startable(self): |
17 | | - self.__get_robot_webservice("/robotframework/run/all/async") |
| 16 | + def test_is_all_robottask_async_startable(self): |
| 17 | + self.__get_robot_webservice( |
| 18 | + "/robotframework/run/all/async", expected_response_code=200 |
| 19 | + ) |
18 | 20 |
|
19 | | - def test_is_robottask_startable(self): |
| 21 | + def test_is_other_robottask_startable(self): |
20 | 22 | response = self.__get_robot_webservice("/robotframework/run/anotherTask") |
21 | 23 | self.__is_robot_passed(response=response) |
22 | 24 |
|
23 | | - def test_is_robottask_async_startable(self): |
| 25 | + def test_is_other_robottask_async_startable(self): |
24 | 26 | self.__get_robot_webservice("/robotframework/run/anotherTask/async") |
25 | 27 |
|
26 | 28 | def test_robottask_with_variables(self): |
@@ -69,21 +71,37 @@ def test_is_robotreport_available(self): |
69 | 71 |
|
70 | 72 | def test_is_robot_run(self): |
71 | 73 | with TestClient(app) as client: |
72 | | - response = client.post("/robotframework/run", json={"task": "Another task", "test": "Demonstration Test"}) |
| 74 | + response = client.post( |
| 75 | + "/robotframework/run", |
| 76 | + json={"task": "Another task", "test": "Demonstration Test"}, |
| 77 | + ) |
73 | 78 | self.assertEqual(400, response.status_code) |
74 | | - self.assertEqual("Options test and task cannot be both specified", response.text) |
| 79 | + self.assertEqual( |
| 80 | + "Options test and task cannot be both specified", response.text |
| 81 | + ) |
75 | 82 |
|
76 | | - response = client.post("/robotframework/run", json={"task": "Another task", "sync": True}) |
| 83 | + response = client.post( |
| 84 | + "/robotframework/run", json={"task": "Another task", "sync": True} |
| 85 | + ) |
77 | 86 | self.assertEqual(200, response.status_code) |
78 | 87 |
|
79 | | - response = client.post("/robotframework/run", json={"paths": ["examples"], "test": "Demonstration Test", "sync": True}) |
| 88 | + response = client.post( |
| 89 | + "/robotframework/run", |
| 90 | + json={ |
| 91 | + "paths": ["examples"], |
| 92 | + "test": "Demonstration Test", |
| 93 | + "sync": True, |
| 94 | + }, |
| 95 | + ) |
80 | 96 | self.assertEqual(200, response.status_code) |
81 | 97 |
|
82 | 98 | def test_delete_robotlogs(self): |
83 | 99 | with TestClient(app) as client: |
84 | 100 | response = client.delete("/robotframework/logs/not_existing") |
85 | 101 | self.assertEqual(404, response.status_code) |
86 | | - self.assertEqual("The logs not_existing not existing or being generating", response.text) |
| 102 | + self.assertEqual( |
| 103 | + "The logs not_existing not existing or being generating", response.text |
| 104 | + ) |
87 | 105 |
|
88 | 106 | run_response = client.get("/robotframework/run/anotherTask") |
89 | 107 | execution_id = run_response.headers["x-request-id"] |
|
0 commit comments