MCPcopy Index your code
hub / github.com/webpy/webpy / testRedirect

Method testRedirect

tests/test_browser.py:60–71  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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")

Callers

nothing calls this directly

Calls 2

browserMethod · 0.80
openMethod · 0.80

Tested by

no test coverage detected