test_basic.py — flask Source File
Architecture documentation for test_basic.py, a python file in the flask codebase. 19 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 85bc4fb5_d1d7_a135_020d_69e052c12c0f["test_basic.py"] 4ebb523a_99d8_b7f3_9638_88f6fa40b3bd["gc"] 85bc4fb5_d1d7_a135_020d_69e052c12c0f --> 4ebb523a_99d8_b7f3_9638_88f6fa40b3bd 7d9ebc53_a992_d150_c79b_39c114a84acf["importlib.metadata"] 85bc4fb5_d1d7_a135_020d_69e052c12c0f --> 7d9ebc53_a992_d150_c79b_39c114a84acf 2d179a80_c967_3979_8233_1db27e63ff0d["re"] 85bc4fb5_d1d7_a135_020d_69e052c12c0f --> 2d179a80_c967_3979_8233_1db27e63ff0d 852dc50b_4da6_57dc_ead7_cdd90925e0b8["typing"] 85bc4fb5_d1d7_a135_020d_69e052c12c0f --> 852dc50b_4da6_57dc_ead7_cdd90925e0b8 c26d67c5_e5bf_05b7_bcb4_ac69089e1109["uuid"] 85bc4fb5_d1d7_a135_020d_69e052c12c0f --> c26d67c5_e5bf_05b7_bcb4_ac69089e1109 63a99ca9_769e_3a2f_1040_efa398b8241d["weakref"] 85bc4fb5_d1d7_a135_020d_69e052c12c0f --> 63a99ca9_769e_3a2f_1040_efa398b8241d edaa6006_b261_47ac_daeb_d732207d6228["contextlib"] 85bc4fb5_d1d7_a135_020d_69e052c12c0f --> edaa6006_b261_47ac_daeb_d732207d6228 bdb4799f_8b0c_fcfd_51cc_f0b833652f8f["datetime"] 85bc4fb5_d1d7_a135_020d_69e052c12c0f --> bdb4799f_8b0c_fcfd_51cc_f0b833652f8f 7aa2bb55_1207_c6a6_eaea_dc8955c0e441["platform"] 85bc4fb5_d1d7_a135_020d_69e052c12c0f --> 7aa2bb55_1207_c6a6_eaea_dc8955c0e441 da94d511_b8b8_a450_f67f_fc28ea9b648a["pytest"] 85bc4fb5_d1d7_a135_020d_69e052c12c0f --> da94d511_b8b8_a450_f67f_fc28ea9b648a ff917c05_6a39_6aa2_fc98_d3c5af4516f4["werkzeug.serving"] 85bc4fb5_d1d7_a135_020d_69e052c12c0f --> ff917c05_6a39_6aa2_fc98_d3c5af4516f4 73ef7241_8c5f_09fd_18d9_bc9f2aafacb1["markupsafe"] 85bc4fb5_d1d7_a135_020d_69e052c12c0f --> 73ef7241_8c5f_09fd_18d9_bc9f2aafacb1 9b468bc7_cc0b_fef2_ed71_07b4f027fb55["werkzeug.exceptions"] 85bc4fb5_d1d7_a135_020d_69e052c12c0f --> 9b468bc7_cc0b_fef2_ed71_07b4f027fb55 c8ef0481_732f_584a_537b_20ea831e8fd0["werkzeug.http"] 85bc4fb5_d1d7_a135_020d_69e052c12c0f --> c8ef0481_732f_584a_537b_20ea831e8fd0 style 85bc4fb5_d1d7_a135_020d_69e052c12c0f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import gc
import importlib.metadata
import re
import typing as t
import uuid
import weakref
from contextlib import nullcontext
from datetime import datetime
from datetime import timezone
from platform import python_implementation
import pytest
import werkzeug.serving
from markupsafe import Markup
from werkzeug.exceptions import BadRequest
from werkzeug.exceptions import Forbidden
from werkzeug.exceptions import NotFound
from werkzeug.http import parse_date
from werkzeug.routing import BuildError
from werkzeug.routing import RequestRedirect
import flask
require_cpython_gc = pytest.mark.skipif(
python_implementation() != "CPython",
reason="Requires CPython GC behavior",
)
def test_options_work(app, client):
@app.route("/", methods=["GET", "POST"])
def index():
return "Hello World"
rv = client.open("/", method="OPTIONS")
assert sorted(rv.allow) == ["GET", "HEAD", "OPTIONS", "POST"]
assert rv.data == b""
def test_options_on_multiple_rules(app, client):
@app.route("/", methods=["GET", "POST"])
def index():
return "Hello World"
@app.route("/", methods=["PUT"])
def index_put():
return "Aha!"
rv = client.open("/", method="OPTIONS")
assert sorted(rv.allow) == ["GET", "HEAD", "OPTIONS", "POST", "PUT"]
@pytest.mark.parametrize("method", ["get", "post", "put", "delete", "patch"])
def test_method_route(app, client, method):
method_route = getattr(app, method)
client_method = getattr(client, method)
@method_route("/")
def hello():
return "Hello"
// ... (1890 more lines)
Domain
Subdomains
Functions
- test_after_request_processing()
- test_app_freed_on_zero_refcount()
- test_baseexception_error_handling()
- test_before_after_request_order()
- test_before_request_and_routing_errors()
- test_build_error_handler()
- test_build_error_handler_reraise()
- test_disallow_string_for_allowed_methods()
- test_enctype_debug_helper()
- test_endpoint_decorator()
- test_error_handler_after_processor_error()
- test_error_handling()
- test_error_handling_processing()
- test_errorhandler_precedence()
- test_exception_propagation()
- test_extended_flashing()
- test_flashes()
- test_g_iteration_protocol()
- test_get_method_on_g()
- test_http_error_subclass_handling()
- test_inject_blueprint_url_defaults()
- test_json_dump_dataclass()
- test_jsonify_args_and_kwargs_check()
- test_jsonify_mimetype()
- test_jsonify_no_prettyprint()
- test_make_response()
- test_make_response_with_response_instance()
- test_max_cookie_size()
- test_method_route()
- test_method_route_no_methods()
- test_missing_session()
- test_multi_route_class_views()
- test_multi_route_rules()
- test_no_setup_after_first_request()
- test_nonascii_pathinfo()
- test_options_on_multiple_rules()
- test_options_work()
- test_provide_automatic_options_attr()
- test_provide_automatic_options_kwarg()
- test_request_dispatching()
- test_request_locals()
- test_request_preprocessing_early_return()
- test_request_processing()
- test_response_type_errors()
- test_response_types()
- test_route_decorator_custom_endpoint()
- test_routing_redirect_debugging()
- test_run_defaults()
- test_run_from_config()
- test_run_server_port()
- test_server_name_matching()
- test_server_name_subdomain()
- test_session()
- test_session_cookie_setting()
- test_session_expiration()
- test_session_path()
- test_session_refresh_vary()
- test_session_secret_key_fallbacks()
- test_session_special_types()
- test_session_stored_last()
- test_session_using_application_root()
- test_session_using_samesite_attribute()
- test_session_using_session_settings()
- test_session_vary_cookie()
- test_static_files()
- test_static_folder_with_ending_slash()
- test_static_folder_with_pathlib_path()
- test_static_route_with_host_matching()
- test_static_url_empty_path()
- test_static_url_empty_path_default()
- test_static_url_path()
- test_static_url_path_with_ending_slash()
- test_subdomain_basic_support()
- test_subdomain_matching()
- test_subdomain_matching_other_name()
- test_subdomain_matching_with_ports()
- test_teardown_request_handler()
- test_teardown_request_handler_debug_mode()
- test_teardown_request_handler_error()
- test_trap_bad_request_key_error()
- test_trapping_of_all_http_exceptions()
- test_url_for_passes_special_values_to_build_error_handler()
- test_url_generation()
- test_url_mapping()
- test_url_processors()
- test_user_error_handling()
- test_werkzeug_passthrough_errors()
- test_werkzeug_routing()
Dependencies
- contextlib
- dataclasses
- datetime
- flask
- flask.debughelpers
- gc
- importlib.metadata
- markupsafe
- pathlib
- platform
- pytest
- re
- typing
- uuid
- weakref
- werkzeug.exceptions
- werkzeug.http
- werkzeug.routing
- werkzeug.serving
Source
Frequently Asked Questions
What does test_basic.py do?
test_basic.py is a source file in the flask codebase, written in python. It belongs to the ApplicationCore domain, ExtensionRegistry subdomain.
What functions are defined in test_basic.py?
test_basic.py defines 88 function(s): test_after_request_processing, test_app_freed_on_zero_refcount, test_baseexception_error_handling, test_before_after_request_order, test_before_request_and_routing_errors, test_build_error_handler, test_build_error_handler_reraise, test_disallow_string_for_allowed_methods, test_enctype_debug_helper, test_endpoint_decorator, and 78 more.
What does test_basic.py depend on?
test_basic.py imports 19 module(s): contextlib, dataclasses, datetime, flask, flask.debughelpers, gc, importlib.metadata, markupsafe, and 11 more.
Where is test_basic.py in the architecture?
test_basic.py is located at tests/test_basic.py (domain: ApplicationCore, subdomain: ExtensionRegistry, directory: tests).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free