MCPcopy
hub / github.com/aio-libs/aiohttp / test_HTTPOk

Function test_HTTPOk

tests/test_web_exceptions.py:52–62  ·  view source on GitHub ↗
(buf, request)

Source from the content-addressed store, hash-verified

50
51@pytest.mark.run_loop
52def test_HTTPOk(buf, request):
53 resp = web.HTTPOk()
54 yield from resp.prepare(request)
55 yield from resp.write_eof()
56 txt = buf.decode('utf8')
57 assert re.match(('HTTP/1.1 200 OK\r\n'
58 'CONTENT-TYPE: text/plain; charset=utf-8\r\n'
59 'CONTENT-LENGTH: 7\r\n'
60 'DATE: .+\r\n'
61 'SERVER: .+\r\n\r\n'
62 '200: OK'), txt)
63
64
65def test_terminal_classes_has_status_code():

Callers

nothing calls this directly

Calls 4

decodeMethod · 0.80
prepareMethod · 0.45
write_eofMethod · 0.45
matchMethod · 0.45

Tested by

no test coverage detected