| Total Complexity | 2 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | """ |
||
| 2 | All other misc. URL-related integration tests. |
||
| 3 | """ |
||
| 4 | |||
| 5 | from . import integ_test_base |
||
| 6 | |||
| 7 | |||
| 8 | class TestURL(integ_test_base.IntegTestBase): |
||
| 9 | def test_notexistent_url(self): |
||
| 10 | # Uncomment the following line to preserve |
||
| 11 | # test case output and other files (config, state, ect.) |
||
| 12 | # in system temp folder. |
||
| 13 | # self.set_delete_temp_folder(False) |
||
| 14 | |||
| 15 | conn = self._get_connection() |
||
| 16 | conn.request("GET", "/unicorn")
|
||
| 17 | res = conn.getresponse() |
||
| 18 | |||
| 19 | self.assertEqual(404, res.status) |
||
| 20 | |||
| 21 | def test_static_page(self): |
||
| 22 | conn = self._get_connection() |
||
| 23 | conn.request("GET", "/")
|
||
| 24 | res = conn.getresponse() |
||
| 25 | |||
| 26 | self.assertEqual(200, res.status) |
||
| 27 |