(self)
| 29 | thread.join() |
| 30 | |
| 31 | def test_layers_bytes(self): |
| 32 | urls = ("/", "bytes") |
| 33 | |
| 34 | class bytes: |
| 35 | def GET(self): |
| 36 | return b"abcdef" |
| 37 | |
| 38 | app = web.application(urls, locals()) |
| 39 | |
| 40 | thread = threading.Thread(target=app.run) |
| 41 | thread.start() |
| 42 | time.sleep(0.5) |
| 43 | |
| 44 | b = web.browser.AppBrowser(app) |
| 45 | r = b.open("/") |
| 46 | self.assertEqual(r.read(), b"abcdef") |
| 47 | |
| 48 | app.stop() |
| 49 | thread.join() |
| 50 | |
| 51 | def test_unicode_url(self): |
| 52 | urls = ("/([^/]+)", "url_passthrough") |