Home / Function/ test_jsonify_arrays() — flask Function Reference

test_jsonify_arrays() — flask Function Reference

Architecture documentation for the test_jsonify_arrays() function in test_json.py from the flask codebase.

Entity Profile

Dependency Diagram

graph TD
  382249a2_3e80_3714_018c_1b6630f82878["test_jsonify_arrays()"]
  f9bd76f2_7704_622d_4d31_ee892fa7fced["test_json.py"]
  382249a2_3e80_3714_018c_1b6630f82878 -->|defined in| f9bd76f2_7704_622d_4d31_ee892fa7fced
  af9b4ad1_d149_7221_6f38_bac5b994a400["loads()"]
  382249a2_3e80_3714_018c_1b6630f82878 -->|calls| af9b4ad1_d149_7221_6f38_bac5b994a400
  style 382249a2_3e80_3714_018c_1b6630f82878 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_json.py lines 105–130

def test_jsonify_arrays(app, client):
    """Test jsonify of lists and args unpacking."""
    a_list = [
        0,
        42,
        3.14,
        "t",
        "hello",
        True,
        False,
        ["test list", 2, False],
        {"test": "dict"},
    ]

    @app.route("/args_unpack")
    def return_args_unpack():
        return flask.jsonify(*a_list)

    @app.route("/array")
    def return_array():
        return flask.jsonify(a_list)

    for url in "/args_unpack", "/array":
        rv = client.get(url)
        assert rv.mimetype == "application/json"
        assert flask.json.loads(rv.data) == a_list

Subdomains

Defined In

Calls

Frequently Asked Questions

What does test_jsonify_arrays() do?
test_jsonify_arrays() is a function in the flask codebase, defined in tests/test_json.py.
Where is test_jsonify_arrays() defined?
test_jsonify_arrays() is defined in tests/test_json.py at line 105.
What does test_jsonify_arrays() call?
test_jsonify_arrays() calls 1 function(s): loads.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free