MCPcopy Create free account
hub / github.com/webpy/webpy / test_layers_bytes

Method test_layers_bytes

tests/test_wsgi.py:31–49  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

openMethod · 0.80
stopMethod · 0.80
joinMethod · 0.80

Tested by

no test coverage detected