Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Kludex/uvicorn
/ functions
Functions
777 in github.com/Kludex/uvicorn
⨍
Functions
777
◇
Types & classes
86
↳
Endpoints
1
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:1225
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:561
Function
test_no_server_headers
(ws_protocol_cls: WSProtocol, http_protocol_cls: HTTPProtocol, unused_tcp_port: int)
tests/protocols/test_websocket.py:1201
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:510
Function
test_partial_response_returned
(http_protocol_cls: type[HTTPProtocol])
tests/protocols/test_http.py:571
Function
test_path_and_raw_path
(ws_protocol_cls: WSProtocol, http_protocol_cls: HTTPProtocol, unused_tcp_port: int)
tests/protocols/test_websocket.py:247
Function
test_pipelined_requests
(http_protocol_cls: type[HTTPProtocol])
tests/protocols/test_http.py:480
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:725
Function
test_read_after_response
(http_protocol_cls: type[HTTPProtocol])
tests/protocols/test_http.py:679
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:582
Function
test_return_close_header
(http_protocol_cls: type[HTTPProtocol])
tests/protocols/test_http.py:1045
Function
test_root_path
(http_protocol_cls: type[HTTPProtocol])
tests/protocols/test_http.py:710
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
Function
test_run_password
( tls_ca_ssl_context, tls_certificate_server_cert_path, tls_ca_certificate_pem_path, tls_certi
tests/test_ssl.py:82
Function
test_run_reload
(unused_tcp_port: int)
tests/test_main.py:72
Function
test_run_skips_eager_app_import_with_workers
With `--workers > 1` the parent does not import the app. Spawn-based workers re-import everything, so loading it in the supervisor only waste
tests/test_main.py:111
Function
test_run_ssl_context_factory_custom
A factory that builds its own SSLContext from scratch should work without ssl_keyfile/ssl_certfile.
tests/test_ssl.py:133
Function
test_run_ssl_context_factory_default
A factory that just delegates to the default factory should produce a working server.
tests/test_ssl.py:106
Function
test_run_startup_failure
(caplog: pytest.LogCaptureFixture)
tests/test_main.py:163
Function
test_running_log_using_fd
(caplog: pytest.LogCaptureFixture, unused_tcp_port: int)
tests/middleware/test_logging.py:173
Function
test_running_log_using_uds
( caplog: pytest.LogCaptureFixture, short_socket_name: str, unused_tcp_port: int )
tests/middleware/test_logging.py:160
Function
test_scopes
( asgi2or3_app: ASGIApplication, expected_scopes: dict[str, str], http_protocol_cls: type[HTTPProt
tests/protocols/test_http.py:902
Function
test_send_after_protocol_close
( ws_protocol_cls: WSProtocol, http_protocol_cls: HTTPProtocol, unused_tcp_port: int )
tests/protocols/test_websocket.py:366
Function
test_send_and_close_connection
( ws_protocol_cls: WSProtocol, http_protocol_cls: HTTPProtocol, unused_tcp_port: int )
tests/protocols/test_websocket.py:302
Function
test_send_before_handshake
( ws_protocol_cls: WSProtocol, http_protocol_cls: HTTPProtocol, unused_tcp_port: int )
tests/protocols/test_websocket.py:397
Function
test_send_binary_data_to_client
( ws_protocol_cls: WSProtocol, http_protocol_cls: HTTPProtocol, unused_tcp_port: int )
tests/protocols/test_websocket.py:284
Function
test_send_binary_data_to_server
( ws_protocol_cls: WSProtocol, http_protocol_cls: HTTPProtocol, unused_tcp_port: int )
tests/protocols/test_websocket.py:343
Function
test_send_binary_data_to_server_bigger_than_default_on_websockets
( http_protocol_cls: HTTPProtocol, client_size_sent: int, server_size_max: int, expected_resul
tests/protocols/test_websocket.py:708
Function
test_send_close_on_server_shutdown
( ws_protocol_cls: WSProtocol, http_protocol_cls: HTTPProtocol, unused_tcp_port: int )
tests/protocols/test_websocket.py:624
Function
test_send_text_data_to_client
( ws_protocol_cls: WSProtocol, http_protocol_cls: HTTPProtocol, unused_tcp_port: int )
tests/protocols/test_websocket.py:266
Function
test_send_text_data_to_server
( ws_protocol_cls: WSProtocol, http_protocol_cls: HTTPProtocol, unused_tcp_port: int )
tests/protocols/test_websocket.py:320
Function
test_server_can_read_messages_in_buffer_after_close
( ws_protocol_cls: WSProtocol, http_protocol_cls: HTTPProtocol, unused_tcp_port: int )
tests/protocols/test_websocket.py:1102
Function
test_server_interrupt
Test interrupting a Server that is run explicitly inside asyncio
tests/test_server.py:69
Function
test_server_keepalive_disabled
( ws_protocol_cls: WSProtocol, http_protocol_cls: HTTPProtocol, unused_tcp_port: int )
tests/protocols/test_websocket.py:1390
Function
test_server_keepalive_ping_pong
( ws_protocol_cls: WSProtocol, http_protocol_cls: HTTPProtocol, unused_tcp_port: int )
tests/protocols/test_websocket.py:1319
Function
test_server_keepalive_ping_timeout
( ws_protocol_cls: WSProtocol, http_protocol_cls: HTTPProtocol, unused_tcp_port: int )
tests/protocols/test_websocket.py:1358
Function
test_server_multiple_websocket_http_response_start_events
The server should raise an exception if it sends multiple websocket.http.response.start events.
tests/protocols/test_websocket.py:1055
Function
test_server_reject_connection
( ws_protocol_cls: WSProtocol, http_protocol_cls: HTTPProtocol, unused_tcp_port: int )
tests/protocols/test_websocket.py:814
Function
test_server_reject_connection_with_body_nolength
( ws_protocol_cls: WSProtocol, http_protocol_cls: HTTPProtocol, unused_tcp_port: int )
tests/protocols/test_websocket.py:955
Function
test_server_reject_connection_with_invalid_msg
( ws_protocol_cls: WSProtocol, http_protocol_cls: HTTPProtocol, unused_tcp_port: int )
tests/protocols/test_websocket.py:987
Function
test_server_reject_connection_with_invalid_status
( ws_protocol_cls: WSProtocol, http_protocol_cls: HTTPProtocol, unused_tcp_port: int )
tests/protocols/test_websocket.py:922
Function
test_server_reject_connection_with_missing_body
( ws_protocol_cls: WSProtocol, http_protocol_cls: HTTPProtocol, unused_tcp_port: int )
tests/protocols/test_websocket.py:1021
Function
test_server_reject_connection_with_multibody_response
( ws_protocol_cls: WSProtocol, http_protocol_cls: HTTPProtocol, unused_tcp_port: int )
tests/protocols/test_websocket.py:882
Function
test_server_reject_connection_with_response
( ws_protocol_cls: WSProtocol, http_protocol_cls: HTTPProtocol, unused_tcp_port: int )
tests/protocols/test_websocket.py:851
Function
test_server_start_with_port_zero
(caplog: pytest.LogCaptureFixture)
tests/middleware/test_logging.py:202
Function
test_set_app_via_environment_variable
()
tests/test_cli.py:195
Function
test_setup_event_loop_is_removed
(caplog: pytest.LogCaptureFixture)
tests/test_config.py:665
Method
test_should_not_reload_when_dot_file_is_changed
(self, touch_soon: Callable[[Path], None])
tests/supervisors/test_reload.py:189
Method
test_should_not_reload_when_exclude_pattern_match_file_is_changed
( self, touch_soon: Callable[[Path], None] )
tests/supervisors/test_reload.py:166
Method
test_should_not_reload_when_only_subdirectory_is_watched
( self, touch_soon: Callable[[Path], None] )
tests/supervisors/test_reload.py:226
← previous
next →
601–700 of 777, ranked by callers