Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Kludex/uvicorn
/ functions
Functions
820 in github.com/Kludex/uvicorn
⨍
Functions
820
◇
Types & classes
88
↳
Endpoints
1
Function
test_is_ssl_true_when_only_factory_set
()
tests/test_ssl.py:216
Function
test_iterator_headers
(http_protocol_cls: type[HTTPProtocol])
tests/protocols/test_http.py:1102
Function
test_keepalive
(http_protocol_cls: type[HTTPProtocol])
tests/protocols/test_http.py:390
Function
test_keepalive_timeout
(http_protocol_cls: type[HTTPProtocol])
tests/protocols/test_http.py:401
Function
test_keepalive_timeout_with_pipelined_requests
(http_protocol_cls: type[HTTPProtocol])
tests/protocols/test_http.py:415
Function
test_large_post_request
(http_protocol_cls: type[HTTPProtocol])
tests/protocols/test_http.py:529
Function
test_lifespan_auto
()
tests/test_lifespan.py:59
Function
test_lifespan_auto_with_error
()
tests/test_lifespan.py:92
Function
test_lifespan_off
()
tests/test_lifespan.py:43
Function
test_lifespan_on
()
tests/test_lifespan.py:10
Function
test_lifespan_on_with_error
()
tests/test_lifespan.py:110
Function
test_lifespan_scope_asgi2app
()
tests/test_lifespan.py:183
Function
test_lifespan_scope_asgi3app
()
tests/test_lifespan.py:160
Function
test_lifespan_state
()
tests/test_lifespan.py:244
Function
test_lifespan_state
(http_protocol_cls: type[HTTPProtocol])
tests/protocols/test_http.py:1114
Function
test_lifespan_state
(ws_protocol_cls: WSProtocol, http_protocol_cls: HTTPProtocol, unused_tcp_port: int)
tests/protocols/test_websocket.py:1331
Function
test_lifespan_with_failed_shutdown
(mode, raise_exception, caplog)
tests/test_lifespan.py:210
Function
test_lifespan_with_failed_startup
(mode, raise_exception, caplog)
tests/test_lifespan.py:131
Function
test_limit_max_requests_jitter
( unused_tcp_port: int, http_protocol_cls: type[H11Protocol | HttpToolsProtocol], caplog: pytest.LogCaptur
tests/test_server.py:153
Function
test_log_config_default
Test that one can specify the use_colors option when using the default logging config.
tests/test_config.py:312
Function
test_log_config_file
Test that one can load a configparser config from disk.
tests/test_config.py:399
Function
test_log_config_json
Test that one can load a json config from disk.
tests/test_config.py:331
Function
test_log_config_pathlike
Test that one can pass a `os.PathLike` (e.g. `pathlib.Path`) as the log config path.
tests/test_config.py:378
Function
test_log_config_yaml
Test that one can load a yaml config from disk.
tests/test_config.py:350
Function
test_log_config_yaml_missing_pyyaml
Test that a helpful error is raised when PyYAML is not installed.
tests/test_config.py:369
Function
test_loop_auto
()
tests/test_auto_detection.py:36
Function
test_max_concurrency
(http_protocol_cls: type[HTTPProtocol])
tests/protocols/test_http.py:752
Function
test_message_after_body_complete
(http_protocol_cls: type[HTTPProtocol])
tests/protocols/test_http.py:626
Function
test_message_logger
(caplog: pytest.LogCaptureFixture)
tests/middleware/test_message_logger.py:11
Function
test_message_logger_exc
(caplog: pytest.LogCaptureFixture)
tests/middleware/test_message_logger.py:34
Function
test_missing_handshake
(ws_protocol_cls: WSProtocol, http_protocol_cls: HTTPProtocol, unused_tcp_port: int)
tests/protocols/test_websocket.py:390
Function
test_missing_start_message
(http_protocol_cls: type[HTTPProtocol])
tests/protocols/test_http.py:615
Function
test_multiple_server_header
( ws_protocol_cls: WSProtocol, http_protocol_cls: HTTPProtocol, unused_tcp_port: int )
tests/protocols/test_websocket.py:1305
Function
test_multiprocess_health_check
Ensure that the health check works as expected.
tests/supervisors/test_multiprocess.py:89
Function
test_multiprocess_restart_aborts_when_replacement_not_ready
If a replacement never becomes ready, the existing worker is kept and the restart is aborted.
tests/supervisors/test_multiprocess.py:174
Function
test_multiprocess_restart_stops_when_shutting_down
()
tests/supervisors/test_multiprocess.py:199
Function
test_multiprocess_run
A basic sanity check. Simply run the supervisor against a no-op server, and signal for it to quit immediately.
tests/supervisors/test_multiprocess.py:74
Function
test_multiprocess_sigbreak
Ensure that the SIGBREAK signal is handled as expected.
tests/supervisors/test_multiprocess.py:140
Function
test_multiprocess_sighup
Ensure that the SIGHUP signal is handled as expected.
tests/supervisors/test_multiprocess.py:153
Function
test_multiprocess_sigterm
Ensure that the SIGTERM signal is handled as expected.
tests/supervisors/test_multiprocess.py:126
Function
test_multiprocess_sigttin
Ensure that the SIGTTIN signal is handled as expected.
tests/supervisors/test_multiprocess.py:210
Function
test_multiprocess_sigttou
Ensure that the SIGTTOU signal is handled as expected.
tests/supervisors/test_multiprocess.py:225
Function
test_multiprocess_worker_dies_on_startup
A worker that fails to load the app stops the parent instead of restarting forever. Regression for https://github.com/encode/uvicorn/discussions/
tests/supervisors/test_multiprocess.py:109
Function
test_no_date_header_on_wsproto
(http_protocol_cls: HTTPProtocol, unused_tcp_port: int)
tests/protocols/test_websocket.py:1282
Function
test_no_import_needed
()
tests/importer/test_importer.py:39
Function
test_no_response_returned
(http_protocol_cls: type[HTTPProtocol])
tests/protocols/test_http.py:571
Function
test_no_server_headers
(ws_protocol_cls: WSProtocol, http_protocol_cls: HTTPProtocol, unused_tcp_port: int)
tests/protocols/test_websocket.py:1258
Function
test_non_existant_reload_dir_is_not_set
(reload_directory_structure: Path, caplog: pytest.LogCaptureFixture)
tests/test_config.py:91
Method
test_override_defaults
(self, touch_soon: Callable[[Path], None])
tests/supervisors/test_reload.py:246
Function
test_override_server_header
(unused_tcp_port: int)
tests/test_default_headers.py:27
Function
test_override_server_header_multiple_times
(unused_tcp_port: int)
tests/test_default_headers.py:44
Function
test_oversized_request
(http_protocol_cls: type[HTTPProtocol])
tests/protocols/test_http.py:520
Function
test_partial_response_returned
(http_protocol_cls: type[HTTPProtocol])
tests/protocols/test_http.py:581
Function
test_path_and_raw_path
(ws_protocol_cls: WSProtocol, http_protocol_cls: HTTPProtocol, unused_tcp_port: int)
tests/protocols/test_websocket.py:251
Function
test_ping_while_closing
Test that a ping crossing the server close cannot break the closing handshake.
tests/protocols/test_websocket.py:1714
Function
test_pipelined_requests
(http_protocol_cls: type[HTTPProtocol])
tests/protocols/test_http.py:490
Function
test_post_request
(http_protocol_cls: type[HTTPProtocol])
tests/protocols/test_http.py:371
Function
test_process_ping_broken_pipe
()
tests/supervisors/test_multiprocess.py:54
Function
test_process_ping_pong
()
tests/supervisors/test_multiprocess.py:43
Function
test_process_ping_pong_timeout
()
tests/supervisors/test_multiprocess.py:49
Function
test_process_ready
`is_ready()` reflects whether the worker's server has finished startup.
tests/supervisors/test_multiprocess.py:61
Function
test_proxy_headers
()
tests/test_config.py:200
Function
test_proxy_headers_duplicate_x_forwarded_for_is_combined
()
tests/middleware/test_proxy_headers.py:585
Function
test_proxy_headers_duplicate_x_forwarded_proto_uses_last
( proto_headers: list[tuple[bytes, bytes]], expected: str, )
tests/middleware/test_proxy_headers.py:611
Function
test_proxy_headers_empty_x_forwarded_for
()
tests/middleware/test_proxy_headers.py:549
Function
test_proxy_headers_haproxy_behind_alb
()
tests/middleware/test_proxy_headers.py:628
Function
test_proxy_headers_invalid_x_forwarded_for
()
tests/middleware/test_proxy_headers.py:459
Function
test_proxy_headers_multiple_proxies
(trusted_hosts: str | list[str], expected: str)
tests/middleware/test_proxy_headers.py:425
Function
test_proxy_headers_multiple_proxies_with_ports
(trusted_hosts: str | list[str], expected: str)
tests/middleware/test_proxy_headers.py:447
Function
test_proxy_headers_trusted_hosts
(trusted_hosts: str | list[str], expected: str)
tests/middleware/test_proxy_headers.py:372
Function
test_proxy_headers_trusted_hosts_malformed
( forwarded_for: str, forwarded_proto: str | None, expected: str, )
tests/middleware/test_proxy_headers.py:395
Function
test_proxy_headers_websocket_x_forwarded_proto
( forwarded_proto: str, expected: str, ws_protocol_cls: type[WSProtocol | WebSocketsSansIOProtocol
tests/middleware/test_proxy_headers.py:515
Function
test_proxy_headers_x_forwarded_for_port_shapes
(forwarded_for: str, expected: str)
tests/middleware/test_proxy_headers.py:497
Function
test_raw_path
(http_protocol_cls: type[HTTPProtocol])
tests/protocols/test_http.py:735
Function
test_read_after_response
(http_protocol_cls: type[HTTPProtocol])
tests/protocols/test_http.py:689
Function
test_reload_dir_is_set
(reload_directory_structure: Path, caplog: pytest.LogCaptureFixture)
tests/test_config.py:80
Function
test_reload_dir_subdirectories_are_removed
( reload_directory_structure: Path, )
tests/test_config.py:129
Function
test_reload_excluded_subdirectories_are_removed
( reload_directory_structure: Path, )
tests/test_config.py:151
Function
test_reload_included_dir_is_added_to_reload_dirs
( reload_directory_structure: Path, )
tests/test_config.py:112
Function
test_reload_includes_exclude_dir_patterns_are_matched
( reload_directory_structure: Path, caplog: pytest.LogCaptureFixture )
tests/test_config.py:168
Function
test_reload_subdir_removal
(reload_directory_structure: Path)
tests/test_config.py:102
Method
test_reload_when_pattern_matched_file_is_changed
( self, result: bool, touch_soon: Callable[[Path], None] )
tests/supervisors/test_reload.py:152
Method
test_reload_when_python_file_is_changed
(self, touch_soon: Callable[[Path], None])
tests/supervisors/test_reload.py:108
Method
test_reloader_should_initialize
A basic sanity check. Simply run the reloader against a no-op server, and signal for it to quit immediately.
tests/supervisors/test_reload.py:95
Function
test_request_logging
(path: str, http_protocol_cls: type[HTTPProtocol], caplog: pytest.LogCaptureFixture)
tests/protocols/test_http.py:346
Function
test_request_than_limit_max_requests_warn_log
( unused_tcp_port: int, http_protocol_cls: type[H11Protocol | HttpToolsProtocol], caplog: pytest.LogCaptur
tests/test_server.py:140
Function
test_reset_contextvars_asyncio
With reset_contextvars=True, each ASGI run starts with a fresh context. Non-regression test for https://github.com/encode/uvicorn/issues/2167.
tests/test_server.py:229
Function
test_response_header_splitting
(http_protocol_cls: type[HTTPProtocol])
tests/protocols/test_http.py:592
Function
test_return_close_header
(http_protocol_cls: type[HTTPProtocol])
tests/protocols/test_http.py:1055
Function
test_root_path
(http_protocol_cls: type[HTTPProtocol])
tests/protocols/test_http.py:720
Function
test_run
( tls_ca_ssl_context, tls_certificate_server_cert_path, tls_certificate_private_key_path, tls_
tests/test_ssl.py:23
Function
test_run
(host, url: str, unused_tcp_port: int)
tests/test_main.py:56
Function
test_run_chain
( tls_ca_ssl_context, tls_certificate_key_and_chain_path, tls_ca_certificate_pem_path, unused_
tests/test_ssl.py:46
Function
test_run_chain_only
(tls_ca_ssl_context, tls_certificate_key_and_chain_path, unused_tcp_port: int)
tests/test_ssl.py:67
Function
test_run_exits_with_startup_failure_on_unloadable_app
A server exits with the dedicated startup-failure code when the app can't load. The multiprocess supervisor relies on `STARTUP_FAILURE` to tell a
tests/test_server.py:125
Function
test_run_fails_fast_in_parent_on_bad_app_path
A bad app path exits in the parent for the single-process case. Regression for https://github.com/encode/uvicorn/issues/941: the app is impor
tests/test_main.py:91
Function
test_run_imports_app_before_starting_event_loop
`uvicorn.run()` imports the app before `Server.run` opens the event loop. Regression for https://github.com/encode/uvicorn/issues/941: an app who
tests/test_main.py:129
Function
test_run_invalid_app_config_combination
(caplog: pytest.LogCaptureFixture)
tests/test_main.py:80
Function
test_run_match_config_params
()
tests/test_main.py:175
Function
test_run_multiprocess
(unused_tcp_port: int)
tests/test_main.py:64
← previous
next →
601–700 of 820, ranked by callers