test_client_json_no_app_context() — flask Function Reference
Architecture documentation for the test_client_json_no_app_context() function in test_testing.py from the flask codebase.
Entity Profile
Dependency Diagram
graph TD 26d160c4_d00f_d6b9_6b88_863a00dc84c6["test_client_json_no_app_context()"] 8c162ff0_0a8a_d943_77b6_c07b38d297a0["test_testing.py"] 26d160c4_d00f_d6b9_6b88_863a00dc84c6 -->|defined in| 8c162ff0_0a8a_d943_77b6_c07b38d297a0 56d45067_9dd8_867d_365e_b9cbe87f9af8["add()"] 26d160c4_d00f_d6b9_6b88_863a00dc84c6 -->|calls| 56d45067_9dd8_867d_365e_b9cbe87f9af8 style 26d160c4_d00f_d6b9_6b88_863a00dc84c6 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_testing.py lines 271–288
def test_client_json_no_app_context(app, client):
@app.route("/hello", methods=["POST"])
def hello():
return f"Hello, {flask.request.json['name']}!"
class Namespace:
count = 0
def add(self, app):
self.count += 1
ns = Namespace()
with appcontext_popped.connected_to(ns.add, app):
rv = client.post("/hello", json={"name": "Flask"})
assert rv.get_data(as_text=True) == "Hello, Flask!"
assert ns.count == 1
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does test_client_json_no_app_context() do?
test_client_json_no_app_context() is a function in the flask codebase, defined in tests/test_testing.py.
Where is test_client_json_no_app_context() defined?
test_client_json_no_app_context() is defined in tests/test_testing.py at line 271.
What does test_client_json_no_app_context() call?
test_client_json_no_app_context() calls 1 function(s): add.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free