MCPcopy Create free account
hub / github.com/pallets/flask / test_make_response

Function test_make_response

tests/test_basic.py:1258–1277  ·  view source on GitHub ↗
(app, req_ctx)

Source from the content-addressed store, hash-verified

1256
1257
1258def test_make_response(app, req_ctx):
1259 rv = flask.make_response()
1260 assert rv.status_code == 200
1261 assert rv.data == b""
1262 assert rv.mimetype == "text/html"
1263
1264 rv = flask.make_response("Awesome")
1265 assert rv.status_code == 200
1266 assert rv.data == b"Awesome"
1267 assert rv.mimetype == "text/html"
1268
1269 rv = flask.make_response("W00t", 404)
1270 assert rv.status_code == 404
1271 assert rv.data == b"W00t"
1272 assert rv.mimetype == "text/html"
1273
1274 rv = flask.make_response(c for c in "Hello")
1275 assert rv.status_code == 200
1276 assert rv.data == b"Hello"
1277 assert rv.mimetype == "text/html"
1278
1279
1280def test_make_response_with_response_instance(app, req_ctx):

Callers

nothing calls this directly

Calls 1

make_responseMethod · 0.80

Tested by

no test coverage detected