| 58 | self.assertEqual(b.status, 404) |
| 59 | |
| 60 | def testRedirect(self): |
| 61 | b = app.browser() |
| 62 | |
| 63 | b.open("http://0.0.0.0:8080/redirect") |
| 64 | self.assertEqual(b.url, "http://0.0.0.0:8080/") |
| 65 | b.open("http://0.0.0.0:8080/redirect?url=/hello/foo") |
| 66 | self.assertEqual(b.url, "http://0.0.0.0:8080/hello/foo") |
| 67 | |
| 68 | b.open("https://0.0.0.0:8080/redirect") |
| 69 | self.assertEqual(b.url, "https://0.0.0.0:8080/") |
| 70 | b.open("https://0.0.0.0:8080/redirect?url=/hello/foo") |
| 71 | self.assertEqual(b.url, "https://0.0.0.0:8080/hello/foo") |