SYMBOL INDEX (3041 symbols across 283 files) FILE: examples/add_task_sanic.py function notify_server_started_after_five_seconds (line 11) | async def notify_server_started_after_five_seconds(): FILE: examples/amending_request_object.py function append_request (line 11) | def append_request(request): function pop_handler (line 16) | def pop_handler(request): function key_exist_handler (line 21) | def key_exist_handler(request): FILE: examples/authorized_sanic.py function check_request_for_authorization_status (line 12) | def check_request_for_authorization_status(request): function authorized (line 18) | def authorized(f): function test (line 39) | async def test(request): FILE: examples/blueprint_middlware_execution_order.py function request_middleware_1 (line 17) | def request_middleware_1(request): function request_middleware_2 (line 22) | def request_middleware_2(request): function request_middleware_3 (line 27) | def request_middleware_3(request): function resp_middleware_4 (line 32) | def resp_middleware_4(request, response): function resp_middleware_5 (line 37) | def resp_middleware_5(request, response): function resp_middleware_6 (line 42) | def resp_middleware_6(request, response): function pop_handler (line 47) | def pop_handler(request): FILE: examples/blueprints.py function foo (line 12) | async def foo(request): function foo2 (line 17) | async def foo2(request): function index (line 22) | async def index(request): function foo3 (line 27) | async def foo3(request, ws): FILE: examples/delayed_response.py function handler (line 11) | async def handler(request): function handler2 (line 16) | async def handler2(request, t=0.3): FILE: examples/exception_monitoring.py class CustomHandler (line 22) | class CustomHandler(ErrorHandler): method default (line 23) | def default(self, request, exception): function test (line 48) | async def test(request): FILE: examples/hello_world.py function test (line 8) | async def test(request): FILE: examples/http_redirect.py function foo (line 16) | def foo(request): function bar (line 21) | def bar(request): function proxy (line 26) | def proxy(request, path): function start (line 38) | async def start(app, _): function stop (line 48) | async def stop(app, _): function runner (line 57) | async def runner(app: Sanic, app_server: AsyncioServer): FILE: examples/limit_concurrency.py function init (line 15) | def init(sanic, _): function bounded_fetch (line 21) | async def bounded_fetch(session, url): function test (line 31) | async def test(request): FILE: examples/log_request_id.py class RequestIdFilter (line 11) | class RequestIdFilter(logging.Filter): method filter (line 12) | def filter(self, record): function set_request_id (line 54) | async def set_request_id(request): function set_request_header (line 60) | async def set_request_header(request, response): function test (line 65) | async def test(request): function setup (line 72) | def setup(app, loop): FILE: examples/logdna_example.py function get_my_ip_address (line 19) | def get_my_ip_address(remote_server="google.com"): function get_mac_address (line 25) | def get_mac_address(): function log_request (line 50) | def log_request(request: Request): function default (line 55) | def default(request): FILE: examples/modify_header_example.py function handle_request (line 12) | def handle_request(request): function handle_unauthorized_request (line 21) | def handle_unauthorized_request(request): FILE: examples/override_logging.py function test (line 18) | def test(request): FILE: examples/pytest_xdist.py function test_port (line 24) | def test_port(worker_id): function app (line 35) | def app(): function client (line 46) | def client(app, test_port): function test_index (line 51) | def test_index(client, run_id): FILE: examples/raygun_example.py class RaygunExceptionReporter (line 10) | class RaygunExceptionReporter(ErrorHandler): method __init__ (line 11) | def __init__(self, raygun_api_key=None): method default (line 18) | def default(self, request, exception): function test (line 28) | async def test(request): FILE: examples/redirect_example.py function handle_request (line 8) | def handle_request(request): function test (line 13) | async def test(request): FILE: examples/request_stream/server.py class SimpleView (line 12) | class SimpleView(HTTPMethodView): method post (line 14) | async def post(self, request): function handler (line 25) | async def handler(request): function bp_handler (line 38) | async def bp_handler(request): function post_handler (line 48) | async def post_handler(request): FILE: examples/request_timeout.py function test (line 13) | async def test(request): function timeout (line 19) | def timeout(request, exception): FILE: examples/rollbar_example.py class RollbarExceptionHandler (line 13) | class RollbarExceptionHandler(ErrorHandler): method default (line 14) | def default(self, request, exception): function create_error (line 23) | def create_error(request): FILE: examples/run_asgi.py function handler_text (line 18) | def handler_text(request): function handler_json (line 23) | def handler_json(request): function handler_ws (line 28) | async def handler_ws(request, ws): function handler_file (line 40) | async def handler_file(request): function handler_file_stream (line 45) | async def handler_file_stream(request): function handler_stream (line 52) | async def handler_stream(request): function listener_before_server_start (line 63) | async def listener_before_server_start(*args, **kwargs): function listener_after_server_start (line 68) | async def listener_after_server_start(*args, **kwargs): function listener_before_server_stop (line 73) | async def listener_before_server_stop(*args, **kwargs): function listener_after_server_stop (line 78) | async def listener_after_server_stop(*args, **kwargs): function print_on_request (line 83) | async def print_on_request(request): function print_on_response (line 88) | async def print_on_response(request, response): FILE: examples/run_async.py function test (line 12) | async def test(request): function main (line 16) | async def main(): FILE: examples/run_async_advanced.py function before_server_start (line 15) | async def before_server_start(app, loop): function after_server_start (line 20) | async def after_server_start(app, loop): function before_server_stop (line 25) | async def before_server_stop(app, loop): function after_server_stop (line 30) | async def after_server_stop(app, loop): function test (line 35) | async def test(request): FILE: examples/sentry_example.py function working_path (line 20) | async def working_path(request): function raise_error (line 26) | async def raise_error(request): FILE: examples/simple_async_view.py class SimpleView (line 9) | class SimpleView(HTTPMethodView): method get (line 10) | def get(self, request): method post (line 13) | def post(self, request): method put (line 16) | def put(self, request): method patch (line 19) | def patch(self, request): method delete (line 22) | def delete(self, request): class SimpleAsyncView (line 26) | class SimpleAsyncView(HTTPMethodView): method get (line 27) | async def get(self, request): method post (line 30) | async def post(self, request): method put (line 33) | async def put(self, request): FILE: examples/teapot.py function test (line 9) | async def test(req): FILE: examples/try_everything.py function test_async (line 12) | async def test_async(request): function test_sync (line 17) | def test_sync(request): function test_params (line 22) | def test_params(request, name, i): function exception (line 27) | def exception(request): function test_await (line 32) | async def test_await(request): function test_file (line 40) | async def test_file(request): function test_file_stream (line 45) | async def test_file_stream(request): function test (line 57) | async def test(request, exception): function post_json (line 70) | def post_json(request): function post_form_json (line 75) | def post_form_json(request): function query_string (line 86) | def query_string(request): function before_start (line 103) | def before_start(app, loop): function after_start (line 108) | def after_start(app, loop): function before_stop (line 113) | def before_stop(app, loop): function after_stop (line 118) | def after_stop(app, loop): FILE: examples/unix_socket.py function test (line 8) | async def test(request): FILE: examples/url_for_example.py function index (line 8) | async def index(request): function post_handler (line 16) | async def post_handler(request, post_id): FILE: examples/versioned_blueprint_group.py function bp1_name (line 17) | async def bp1_name(request): function bp2_name (line 23) | async def bp2_name(request): function bp2_revised_name (line 29) | async def bp2_revised_name(request): FILE: examples/vhosts.py function hello_0 (line 18) | async def hello_0(request): function hello_1 (line 23) | async def hello_1(request): function hello_2 (line 28) | async def hello_2(request): function hello_3 (line 33) | async def hello_3(request): function name (line 38) | def name(request): FILE: examples/websocket.py function index (line 12) | def index(request): function feed (line 17) | async def feed(request, ws): FILE: guide/content/en/migrate.py function convert_columns (line 22) | def convert_columns(content: str): function cleanup_highlights (line 40) | def cleanup_highlights(content: str): function convert_notifications (line 46) | def convert_notifications(content: str): function convert_emoji (line 61) | def convert_emoji(content: str): function convert_code_blocks (line 68) | def convert_code_blocks(content: str): function cleanup_multibreaks (line 79) | def cleanup_multibreaks(content: str): function convert (line 83) | def convert(content: str): function convert_file (line 93) | def convert_file(src: Path, dest: Path): function translate_path (line 104) | def translate_path(source_dir: Path, source_path: Path, dest_dir: Path): function main (line 110) | def main(): FILE: guide/public/assets/docs.js function trigger (line 8) | function trigger(el, eventType) { function refreshBurger (line 19) | function refreshBurger() { function refreshMenu (line 22) | function refreshMenu() { function refreshMenuLinks (line 25) | function refreshMenuLinks() { function refreshMenuGroups (line 28) | function refreshMenuGroups() { function hasActiveLink (line 31) | function hasActiveLink(element) { function scrollHandler (line 50) | function scrollHandler(e) { function initBurger (line 74) | function initBurger() { function initMenuGroups (line 84) | function initMenuGroups() { function initDetails (line 98) | function initDetails() { function initTabs (line 106) | function initTabs() { function initSearch (line 130) | function initSearch() { function initMermaid (line 141) | function initMermaid() { function refreshAnchors (line 145) | function refreshAnchors() { function setMenuLinkActive (line 149) | function setMenuLinkActive(href) { function copyCode (line 167) | function copyCode(button) { function init (line 183) | function init() { function afterSwap (line 196) | function afterSwap(e) { function beforeRequest (line 205) | function beforeRequest() { function afterRequest (line 210) | function afterRequest() { FILE: guide/webapp/display/base.py class BaseRenderer (line 8) | class BaseRenderer: method __init__ (line 9) | def __init__(self, base_title: str): method get_builder (line 12) | def get_builder(self, full: bool, language: str) -> Builder: method title (line 31) | def title(self) -> str: method _head (line 34) | def _head(self) -> list[Builder]: FILE: guide/webapp/display/code_style.py class SanicCodeStyle (line 11) | class SanicCodeStyle(Style): FILE: guide/webapp/display/layouts/base.py class BaseLayout (line 11) | class BaseLayout: method __init__ (line 12) | def __init__(self, builder: Builder): method __call__ (line 16) | def __call__( method layout (line 23) | def layout( FILE: guide/webapp/display/layouts/elements/footer.py function do_footer (line 9) | def do_footer( function _pagination (line 27) | def _pagination(request: Request) -> Builder: function _pagination_left (line 33) | def _pagination_left(request: Request) -> Builder: function _pagination_right (line 52) | def _pagination_right(request: Request) -> Builder: function _content (line 71) | def _content() -> Builder: FILE: guide/webapp/display/layouts/elements/navbar.py function do_navbar (line 7) | def do_navbar(builder: Builder, request: Request) -> None: function _search_form (line 22) | def _search_form(request: Request) -> Builder: function _render_navbar_item (line 44) | def _render_navbar_item(item: MenuItem, request: Request) -> Builder: FILE: guide/webapp/display/layouts/elements/sidebar.py function do_sidebar (line 8) | def do_sidebar(builder: Builder, request: Request) -> None: function _menu_items (line 13) | def _menu_items(request: Request) -> list[Builder]: function _sanic_logo (line 56) | def _sanic_logo(request: Request) -> Builder: function _sidebar_items (line 68) | def _sidebar_items(request: Request) -> list[Builder]: function _render_sidebar_item (line 76) | def _render_sidebar_item( function _single_sidebar_item (line 96) | def _single_sidebar_item(item: MenuItem, request: Request) -> Builder: function _is_open_item (line 139) | def _is_open_item(item: MenuItem, language: str, current_path: str) -> b... FILE: guide/webapp/display/layouts/home.py class HomeLayout (line 14) | class HomeLayout(BaseLayout): method layout (line 16) | def layout( method _hero (line 25) | def _hero(self, language: str) -> None: method _do_buttons (line 35) | def _do_buttons(self, language: str) -> Builder: method _sponsors (line 56) | def _sponsors(self) -> None: method _footer (line 69) | def _footer(self, request: Request) -> None: FILE: guide/webapp/display/layouts/main.py class MainLayout (line 12) | class MainLayout(BaseLayout): method layout (line 14) | def layout( method _content_wrapper (line 33) | def _content_wrapper( method _navbar (line 48) | def _navbar(self, request: Request) -> None: method _sidebar (line 51) | def _sidebar(self, request: Request) -> None: method _footer (line 54) | def _footer(self, request: Request) -> None: FILE: guide/webapp/display/layouts/models.py class MenuItem (line 6) | class MenuItem(Struct, kw_only=False, omit_defaults=True): class GeneralConfig (line 13) | class GeneralConfig(Struct, kw_only=False): FILE: guide/webapp/display/markdown.py class DocsRenderer (line 25) | class DocsRenderer(HTMLRenderer): method block_code (line 26) | def block_code(self, code: str, info: str | None = None): method heading (line 48) | def heading(self, text: str, level: int, **attrs) -> str: method link (line 65) | def link(self, text: str, url: str, title: str | None = None) -> str: method span (line 89) | def span(self, text, classes, **attrs) -> str: method list (line 94) | def list(self, text: str, ordered: bool, **attrs) -> str: method list_item (line 99) | def list_item(self, text: str, **attrs) -> str: method table (line 103) | def table(self, text: str, **attrs) -> str: method inline_directive (line 107) | def inline_directive(self, text: str, **attrs) -> str: method _make_tag (line 122) | def _make_tag( class SanicTableOfContents (line 133) | class SanicTableOfContents(TableOfContents): method generate_heading_id (line 134) | def generate_heading_id(self, token, index): function render_markdown (line 168) | def render_markdown(text: str) -> str: FILE: guide/webapp/display/page/docobject.py class DocObject (line 20) | class DocObject: function _extract_classes_methods (line 31) | def _extract_classes_methods(obj, full_name, docstrings): function _get_method_signature (line 55) | def _get_method_signature(method): function _is_public_member (line 65) | def _is_public_member(obj: object) -> bool: function _detect_decorators (line 81) | def _detect_decorators(cls, method): function _get_object_type (line 93) | def _get_object_type(obj) -> str: function organize_docobjects (line 108) | def organize_docobjects(package_name: str) -> dict[str, str]: function _table_of_contents (line 125) | def _table_of_contents(objects: list[str]) -> str: function _extract_docobjects (line 140) | def _extract_docobjects(package_name: str) -> dict[str, DocObject]: function _docobject_to_html (line 175) | def _docobject_to_html( function _signature_to_html (line 254) | def _signature_to_html( function _define_heading_and_class (line 299) | def _define_heading_and_class( function _render_params (line 325) | def _render_params(builder: Builder, params: list[DocstringParam]) -> None: function _render_raises (line 354) | def _render_raises(builder: Builder, raises: list[DocstringRaises]) -> N... function _render_returns (line 369) | def _render_returns(builder: Builder, docobject: DocObject) -> None: function _render_examples (line 400) | def _render_examples( FILE: guide/webapp/display/page/page.py class PageMeta (line 26) | class PageMeta: class Page (line 36) | class Page: method get_layout (line 47) | def get_layout(self) -> type[BaseLayout]: method relative_path (line 51) | def relative_path(self) -> Path: method get (line 57) | def get( method load_pages (line 69) | def load_pages(cls, base_path: Path, page_order: list[str]) -> list[Pa... method _load_page (line 127) | def _load_page(path: Path) -> Page: method _load_api_pages (line 147) | def _load_api_pages() -> dict[str, Page]: FILE: guide/webapp/display/page/renderer.py class PageRenderer (line 14) | class PageRenderer(BaseRenderer): method render (line 15) | def render(self, request: Request, language: str, path: str) -> Builder: method title (line 24) | def title(self) -> str: method _setup_request (line 33) | def _setup_request(self, request: Request, language: str, path: str): method _body (line 42) | def _body( method _base (line 53) | def _base(self, request: Request, builder: Builder, page: Page | None): FILE: guide/webapp/display/plugins/attrs.py class Attributes (line 11) | class Attributes(DirectivePlugin): method __call__ (line 12) | def __call__(self, directive, md): method parse (line 18) | def parse( method _render (line 38) | def _render(self, _, text: str, **attrs) -> str: FILE: guide/webapp/display/plugins/columns.py class Column (line 12) | class Column(DirectivePlugin): method parse (line 13) | def parse( method __call__ (line 29) | def __call__( # type: ignore method _render_column (line 37) | def _render_column(self, renderer: HTMLRenderer, text: str, **attrs): FILE: guide/webapp/display/plugins/hook.py class Hook (line 6) | class Hook(DirectivePlugin): method __call__ (line 7) | def __call__( # type: ignore method _hook (line 13) | def _hook(self, md: Markdown, state: BlockState) -> None: FILE: guide/webapp/display/plugins/inline_directive.py function _parse_inline_directive (line 9) | def _parse_inline_directive(inline, m: re.Match, state): function inline_directive (line 20) | def inline_directive(md: Markdown): FILE: guide/webapp/display/plugins/mermaid.py class Mermaid (line 14) | class Mermaid(DirectivePlugin): method parse (line 15) | def parse( method __call__ (line 33) | def __call__(self, directive: RSTDirective, md: Markdown) -> None: # ... method _render_mermaid (line 39) | def _render_mermaid(self, renderer: HTMLRenderer, text: str, **attrs): FILE: guide/webapp/display/plugins/notification.py class Notification (line 5) | class Notification(Admonition): method __call__ (line 16) | def __call__(self, directive, md): method _render_admonition (line 29) | def _render_admonition(self, _, text, name, **attrs) -> str: method _render_admonition_title (line 37) | def _render_admonition_title(self, _, text) -> str: method _render_admonition_content (line 45) | def _render_admonition_content(self, _, text) -> str: FILE: guide/webapp/display/plugins/span.py function parse_inline_span (line 6) | def parse_inline_span(inline, m: re.Match, state): function span (line 20) | def span(md: Markdown) -> None: FILE: guide/webapp/display/plugins/tabs.py class Tabs (line 12) | class Tabs(DirectivePlugin): method parse (line 13) | def parse( method __call__ (line 31) | def __call__( # type: ignore method _render_tab (line 41) | def _render_tab(self, renderer: HTMLRenderer, text: str, **attrs): FILE: guide/webapp/display/search/renderer.py class SearchRenderer (line 13) | class SearchRenderer(BaseRenderer): method render (line 14) | def render( method _body (line 24) | def _body( method _base (line 37) | def _base(self, request: Request, builder: Builder, full: bool): method _results (line 42) | def _results( FILE: guide/webapp/display/search/search.py class Stemmer (line 12) | class Stemmer: method stem (line 23) | def stem(self, word: str) -> str: method _stem (line 33) | def _stem(self, word: str) -> str: method __call__ (line 40) | def __call__(self, word: str) -> str: class Document (line 44) | class Document(Struct, kw_only=True): method title (line 53) | def title(self) -> str: method text (line 57) | def text(self) -> str: method weighted_text (line 61) | def weighted_text(self) -> str: method _term_frequency (line 67) | def _term_frequency(self, stemmer: Stemmer) -> None: method process (line 80) | def process(self, stemmer: Stemmer) -> Document: function _inverse_document_frequency (line 86) | def _inverse_document_frequency(docs: list[Document]) -> dict[str, float]: function _tf_idf_vector (line 95) | def _tf_idf_vector( function _cosine_similarity (line 106) | def _cosine_similarity( function _search (line 118) | def _search( class Searcher (line 144) | class Searcher: method __init__ (line 145) | def __init__( method search (line 166) | def search( FILE: guide/webapp/display/text.py function slugify (line 7) | def slugify(text: str) -> str: FILE: guide/webapp/endpoint/search.py function _search (line 13) | async def _search(request: Request, language: str, searcher: Searcher): function setup_search (line 22) | async def setup_search(app: Sanic): FILE: guide/webapp/endpoint/sitemap.py function setup_sitemap (line 4) | def setup_sitemap(app: Sanic) -> None: function _compile_sitemap (line 9) | async def _compile_sitemap(app: Sanic): function _sitemap (line 31) | async def _sitemap(request: Request): FILE: guide/webapp/worker/config.py function load_menu (line 8) | def load_menu(path: Path) -> list[MenuItem]: function load_config (line 13) | def load_config(path: Path) -> GeneralConfig: FILE: guide/webapp/worker/factory.py function _compile_sidebar_order (line 26) | def _compile_sidebar_order(items: list[MenuItem]) -> list[str]: function create_app (line 36) | def create_app(root: Path) -> Sanic: FILE: guide/webapp/worker/livereload.js function r (line 1) | function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==... function getSubstitution (line 1699) | function getSubstitution(matched, str, position, captures, namedCaptures... function _typeof (line 2257) | function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "fun... function _classCallCheck (line 2258) | function _classCallCheck(instance, Constructor) { if (!(instance instanc... function _defineProperties (line 2259) | function _defineProperties(target, props) { for (var i = 0; i < props.le... function _createClass (line 2260) | function _createClass(Constructor, protoProps, staticProps) { if (protoP... function _toPropertyKey (line 2261) | function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); re... function _toPrimitive (line 2262) | function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || ... function Connector (line 2269) | function Connector(options, WebSocket, Timer, handlers) { function _typeof (line 2482) | function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "fun... function _classCallCheck (line 2483) | function _classCallCheck(instance, Constructor) { if (!(instance instanc... function _defineProperties (line 2484) | function _defineProperties(target, props) { for (var i = 0; i < props.le... function _createClass (line 2485) | function _createClass(Constructor, protoProps, staticProps) { if (protoP... function _toPropertyKey (line 2486) | function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); re... function _toPrimitive (line 2487) | function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || ... function LessPlugin (line 2489) | function LessPlugin(window, host) { function _typeof (line 2558) | function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "fun... function _createForOfIteratorHelper (line 2561) | function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof... function _unsupportedIterableToArray (line 2562) | function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (ty... function _arrayLikeToArray (line 2563) | function _arrayLikeToArray(arr, len) { if (len == null || len > arr.leng... function _classCallCheck (line 2564) | function _classCallCheck(instance, Constructor) { if (!(instance instanc... function _defineProperties (line 2565) | function _defineProperties(target, props) { for (var i = 0; i < props.le... function _createClass (line 2566) | function _createClass(Constructor, protoProps, staticProps) { if (protoP... function _toPropertyKey (line 2567) | function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); re... function _toPrimitive (line 2568) | function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || ... function LiveReload (line 2581) | function LiveReload(window) { function _createForOfIteratorHelper (line 2824) | function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof... function _slicedToArray (line 2825) | function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterab... function _nonIterableRest (line 2826) | function _nonIterableRest() { throw new TypeError("Invalid attempt to de... function _unsupportedIterableToArray (line 2827) | function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (ty... function _arrayLikeToArray (line 2828) | function _arrayLikeToArray(arr, len) { if (len == null || len > arr.leng... function _iterableToArrayLimit (line 2829) | function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "... function _arrayWithHoles (line 2830) | function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _typeof (line 2831) | function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "fun... function _classCallCheck (line 2832) | function _classCallCheck(instance, Constructor) { if (!(instance instanc... function _defineProperties (line 2833) | function _defineProperties(target, props) { for (var i = 0; i < props.le... function _createClass (line 2834) | function _createClass(Constructor, protoProps, staticProps) { if (protoP... function _toPropertyKey (line 2835) | function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); re... function _toPrimitive (line 2836) | function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || ... function Options (line 2838) | function Options() { function _typeof (line 2953) | function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "fun... function _slicedToArray (line 2964) | function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterab... function _nonIterableRest (line 2965) | function _nonIterableRest() { throw new TypeError("Invalid attempt to de... function _unsupportedIterableToArray (line 2966) | function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (ty... function _arrayLikeToArray (line 2967) | function _arrayLikeToArray(arr, len) { if (len == null || len > arr.leng... function _iterableToArrayLimit (line 2968) | function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "... function _arrayWithHoles (line 2969) | function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _defineProperties (line 2970) | function _defineProperties(target, props) { for (var i = 0; i < props.le... function _createClass (line 2971) | function _createClass(Constructor, protoProps, staticProps) { if (protoP... function _toPropertyKey (line 2972) | function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); re... function _toPrimitive (line 2973) | function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || ... function _classCallCheck (line 2974) | function _classCallCheck(instance, Constructor) { if (!(instance instanc... function Parser (line 2984) | function Parser(handlers) { function _typeof (line 3074) | function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "fun... function ownKeys (line 3088) | function ownKeys(object, enumerableOnly) { var keys = Object.keys(object... function _objectSpread (line 3089) | function _objectSpread(target) { for (var i = 1; i < arguments.length; i... function _defineProperty (line 3090) | function _defineProperty(obj, key, value) { key = _toPropertyKey(key); i... function _classCallCheck (line 3091) | function _classCallCheck(instance, Constructor) { if (!(instance instanc... function _defineProperties (line 3092) | function _defineProperties(target, props) { for (var i = 0; i < props.le... function _createClass (line 3093) | function _createClass(Constructor, protoProps, staticProps) { if (protoP... function _toPropertyKey (line 3094) | function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); re... function _toPrimitive (line 3095) | function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || ... function _createForOfIteratorHelper (line 3096) | function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof... function _unsupportedIterableToArray (line 3097) | function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (ty... function _arrayLikeToArray (line 3098) | function _arrayLikeToArray(arr, len) { if (len == null || len > arr.leng... function splitUrl (line 3106) | function splitUrl(url) { function pathFromUrl (line 3141) | function pathFromUrl(url) { function numberOfMatchingSegments (line 3167) | function numberOfMatchingSegments(left, right) { function pickBestMatch (line 3191) | function pickBestMatch(path, objects) { function pathsMatch (line 3229) | function pathsMatch(left, right) { function Reloader (line 3244) | function Reloader(window, console, Timer) { function _typeof (line 3749) | function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "fun... function _classCallCheck (line 3750) | function _classCallCheck(instance, Constructor) { if (!(instance instanc... function _defineProperties (line 3751) | function _defineProperties(target, props) { for (var i = 0; i < props.le... function _createClass (line 3752) | function _createClass(Constructor, protoProps, staticProps) { if (protoP... function _toPropertyKey (line 3753) | function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); re... function _toPrimitive (line 3754) | function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || ... function Timer (line 3756) | function Timer(func) { FILE: guide/webapp/worker/reload.py function setup_livereload (line 12) | def setup_livereload(app: Sanic) -> None: class Livereload (line 47) | class Livereload: method __init__ (line 57) | def __init__( method run (line 73) | def run(self): method _listen_to_queue (line 82) | async def _listen_to_queue(self): method livereload_handler (line 91) | async def livereload_handler(self, request: Request, ws: Websocket): method _wait_for_state (line 100) | async def _wait_for_state(self): function _run_reload_server (line 112) | def _run_reload_server( FILE: guide/webapp/worker/style.py function setup_style (line 10) | def setup_style(app: Sanic) -> None: FILE: sanic/__main__.py function main (line 19) | def main(args=None): FILE: sanic/app.py class Sanic (line 109) | class Sanic( method __init__ (line 228) | def __init__( method __init__ (line 249) | def __init__( method __init__ (line 270) | def __init__( method __init__ (line 291) | def __init__( method __init__ (line 311) | def __init__( method loop (line 399) | def loop(self) -> AbstractEventLoop: method register_listener (line 425) | def register_listener( method register_middleware (line 463) | def register_middleware( method register_named_middleware (line 508) | def register_named_middleware( method _apply_exception_handler (line 562) | def _apply_exception_handler( method _apply_listener (line 581) | def _apply_listener(self, listener: FutureListener): method _apply_route (line 586) | def _apply_route( method _apply_middleware (line 619) | def _apply_middleware( method _apply_signal (line 634) | def _apply_signal(self, signal: FutureSignal) -> Signal: method dispatch (line 645) | def dispatch( method dispatch (line 657) | def dispatch( method dispatch (line 668) | def dispatch( method event (line 721) | async def event( method report_exception (line 790) | def report_exception( method enable_websocket (line 826) | def enable_websocket(self, enable: bool = True) -> None: method blueprint (line 849) | def blueprint( method url_for (line 942) | def url_for(self, view_name: str, **kwargs): method handle_exception (line 1136) | async def handle_exception( method handle_request (line 1277) | async def handle_request(self, request: Request) -> None: # no cov method _websocket_handler (line 1435) | async def _websocket_handler( method test_client (line 1489) | def test_client(self) -> SanicTestClient: # type: ignore # noqa method asgi_client (line 1509) | def asgi_client(self) -> SanicASGITestClient: # type: ignore # noqa method _run_request_middleware (line 1532) | async def _run_request_middleware( method _run_response_middleware (line 1566) | async def _run_response_middleware( method _build_endpoint_name (line 1601) | def _build_endpoint_name(self, *parts): method _cancel_websocket_tasks (line 1606) | def _cancel_websocket_tasks(cls, app): method _listener (line 1611) | async def _listener( method _prep_task (line 1637) | def _prep_task( method _loop_add_task (line 1667) | def _loop_add_task( method dispatch_delayed_tasks (line 1687) | async def dispatch_delayed_tasks(app: Sanic) -> None: method run_delayed_task (line 1706) | async def run_delayed_task( method add_task (line 1730) | def add_task( method get_task (line 1779) | def get_task( method get_task (line 1784) | def get_task( method get_task (line 1789) | def get_task(self, name: str, *, raise_exception: bool) -> Task | None... method get_task (line 1791) | def get_task( method cancel_task (line 1816) | async def cancel_task( method purge_tasks (line 1863) | def purge_tasks(self) -> None: method shutdown_tasks (line 1880) | def shutdown_tasks( method tasks (line 1912) | def tasks(self) -> Iterable[Task[Any]]: method __call__ (line 1929) | async def __call__(self, scope, receive, send): method update_config (line 1955) | def update_config(self, config: bytes | str | dict | Any) -> None: method asgi (line 1972) | def asgi(self) -> bool: method asgi (line 1977) | def asgi(self, value: bool): method debug (line 1981) | def debug(self) -> bool: method auto_reload (line 1986) | def auto_reload(self) -> bool: method auto_reload (line 1991) | def auto_reload(self, value: bool): method state (line 1996) | def state(self) -> ApplicationState: # type: ignore method reload_dirs (line 2005) | def reload_dirs(self) -> set[Path]: method ext (line 2019) | def ext(self) -> Extend: method extend (line 2047) | def extend( method register_app (line 2113) | def register_app(cls, app: Sanic) -> None: method unregister_app (line 2143) | def unregister_app(cls, app: Sanic) -> None: method get_app (line 2170) | def get_app( method _check_uvloop_conflict (line 2243) | def _check_uvloop_conflict(cls) -> None: method amend (line 2257) | def amend(self) -> Iterator[None]: method finalize (line 2289) | def finalize(self) -> None: method signalize (line 2323) | def signalize(self, allow_fail_builtin: bool = True) -> None: method _startup (line 2361) | async def _startup(self): method ack (line 2404) | def ack(self) -> None: method set_serving (line 2414) | def set_serving(self, serving: bool) -> None: method _server_event (line 2428) | async def _server_event( method refresh (line 2461) | def refresh( method inspector (line 2496) | def inspector(self) -> Inspector: method manager (line 2517) | def manager(self) -> WorkerManager: FILE: sanic/application/constants.py class StrEnum (line 4) | class StrEnum(str, Enum): # no cov method _generate_next_value_ (line 5) | def _generate_next_value_(name: str, *args) -> str: # type: ignore method __eq__ (line 8) | def __eq__(self, value: object) -> bool: method __hash__ (line 12) | def __hash__(self) -> int: method __str__ (line 15) | def __str__(self) -> str: class Server (line 19) | class Server(StrEnum): class Mode (line 26) | class Mode(StrEnum): class ServerStage (line 33) | class ServerStage(IntEnum): FILE: sanic/application/ext.py function setup_ext (line 12) | def setup_ext(app: Sanic, *, fail: bool = False, **kwargs): FILE: sanic/application/logo.py function get_logo (line 48) | def get_logo(full: bool = False, coffee: bool = False) -> str: FILE: sanic/application/motd.py class MOTD (line 10) | class MOTD(ABC): method __init__ (line 13) | def __init__( method display (line 28) | def display(self): method output (line 32) | def output( class MOTDBasic (line 51) | class MOTDBasic(MOTD): method display (line 57) | def display(self): class MOTDTTY (line 71) | class MOTDTTY(MOTD): method __init__ (line 74) | def __init__(self, *args, **kwargs) -> None: method set_variables (line 78) | def set_variables(self): # no cov method display (line 108) | def display(self, version=True, action="Goin' Fast", out=None): method _render_data (line 149) | def _render_data(self, lines, data, start): method _render_fill (line 167) | def _render_fill(self, lines): method _get_logo_part (line 174) | def _get_logo_part(self, idx): FILE: sanic/application/spinner.py class _CursorInfo (line 13) | class _CursorInfo(ctypes.Structure): class Spinner (line 17) | class Spinner: # noqa method __init__ (line 23) | def __init__(self, message: str) -> None: method start (line 29) | def start(self): method run (line 34) | def run(self): method stop (line 42) | def stop(self): method cursor (line 48) | def cursor(): method hide (line 53) | def hide(): method show (line 69) | def show(): function loading (line 86) | def loading(message: str = "Loading"): # noqa FILE: sanic/application/state.py class ApplicationServerInfo (line 21) | class ApplicationServerInfo: class ApplicationState (line 30) | class ApplicationState: method __post_init__ (line 62) | def __post_init__(self) -> None: method __setattr__ (line 65) | def __setattr__(self, name: str, value: Any) -> None: method set_mode (line 74) | def set_mode(self, value: str | Mode): method set_verbosity (line 80) | def set_verbosity(self, value: int) -> None: method is_debug (line 89) | def is_debug(self) -> bool: method stage (line 99) | def stage(self) -> ServerStage: FILE: sanic/asgi.py class Lifespan (line 23) | class Lifespan: method __init__ (line 24) | def __init__( method startup (line 49) | async def startup(self) -> None: method shutdown (line 69) | async def shutdown(self) -> None: method __call__ (line 81) | async def __call__(self) -> None: class ASGIApp (line 107) | class ASGIApp: method create (line 117) | async def create( method read (line 192) | async def read(self) -> bytes | None: method __aiter__ (line 206) | async def __aiter__(self): method respond (line 212) | def respond(self, response: BaseHTTPResponse): method send (line 221) | async def send(self, data, end_stream): method __call__ (line 252) | async def __call__(self) -> None: FILE: sanic/base/meta.py class SanicMeta (line 1) | class SanicMeta(type): method __prepare__ (line 3) | def __prepare__(metaclass, name, bases, **kwds): FILE: sanic/base/root.py class BaseSanic (line 19) | class BaseSanic( method __init__ (line 31) | def __init__( method __str__ (line 54) | def __str__(self) -> str: method __repr__ (line 57) | def __repr__(self) -> str: method __setattr__ (line 60) | def __setattr__(self, name: str, value: Any) -> None: FILE: sanic/blueprints.py function lazy (line 37) | def lazy(func, as_decorator=True): class Blueprint (line 71) | class Blueprint(BaseSanic): method __init__ (line 113) | def __init__( method __repr__ (line 137) | def __repr__(self) -> str: method apps (line 155) | def apps(self) -> set[Sanic]: method registered (line 172) | def registered(self) -> bool: method reset (line 188) | def reset(self) -> None: method copy (line 199) | def copy( method group (line 270) | def group( method register (line 333) | def register(self, app, options): method dispatch (line 509) | async def dispatch(self, *args, **kwargs): method event (line 523) | def event( method _event (line 557) | async def _event(self, waiters, timeout): method _extract_value (line 571) | def _extract_value(*values): method _setup_uri (line 580) | def _setup_uri(base: str, prefix: str | None): method register_futures (line 592) | def register_futures( class BlueprintGroup (line 611) | class BlueprintGroup(bpg_base): method __init__ (line 692) | def __init__( method url_prefix (line 708) | def url_prefix(self) -> int | str | float | None: method blueprints (line 718) | def blueprints(self) -> list[Blueprint]: method version (line 728) | def version(self) -> str | int | float | None: method strict_slashes (line 737) | def strict_slashes(self) -> bool | None: method version_prefix (line 746) | def version_prefix(self) -> str: method name_prefix (line 755) | def name_prefix(self) -> str | None: method __iter__ (line 766) | def __iter__(self) -> Iterator[Blueprint]: method __getitem__ (line 775) | def __getitem__(self, item: int) -> Blueprint: ... method __getitem__ (line 778) | def __getitem__(self, item: slice) -> MutableSequence[Blueprint]: ... method __getitem__ (line 780) | def __getitem__( method __setitem__ (line 801) | def __setitem__(self, index: int, item: Blueprint) -> None: ... method __setitem__ (line 804) | def __setitem__(self, index: slice, item: Iterable[Blueprint]) -> None... method __setitem__ (line 806) | def __setitem__( method __delitem__ (line 840) | def __delitem__(self, index: int) -> None: ... method __delitem__ (line 843) | def __delitem__(self, index: slice) -> None: ... method __delitem__ (line 845) | def __delitem__(self, index: int | slice) -> None: method __len__ (line 865) | def __len__(self) -> int: method append (line 873) | def append(self, value: Blueprint) -> None: method exception (line 887) | def exception(self, *exceptions: Exception, **kwargs) -> Callable: method insert (line 918) | def insert(self, index: int, item: Blueprint) -> None: method middleware (line 933) | def middleware(self, *args, **kwargs): method on_request (line 957) | def on_request(self, middleware=None): method on_response (line 971) | def on_response(self, middleware=None): FILE: sanic/cli/app.py class SanicCLI (line 36) | class SanicCLI: method __init__ (line 101) | def __init__(self) -> None: method attach (line 122) | def attach(self): method run (line 182) | def run(self, parse_args=None): method _inspector (line 275) | def _inspector(self): method _kill (line 307) | def _kill(self): method _status (line 312) | def _status(self): method _restart (line 317) | def _restart(self): method _help (line 322) | def _help(self): method _app_daemon_command (line 334) | def _app_daemon_command(self): method _executor (line 361) | def _executor(self, app: Sanic, kwargs: dict): method _repl (line 365) | def _repl(self, app: Sanic): method _setup_daemon (line 379) | def _setup_daemon(self, app_name: str): method _precheck (line 412) | def _precheck(self): method _get_app (line 434) | def _get_app(self, app_loader: AppLoader): method _build_run_kwargs (line 453) | def _build_run_kwargs(self): FILE: sanic/cli/arguments.py class Group (line 12) | class Group: method __init_subclass__ (line 17) | def __init_subclass__(cls) -> None: method __init__ (line 20) | def __init__(self, parser: ArgumentParser, title: str | None): method create (line 29) | def create(cls, parser: ArgumentParser): method add_bool_arguments (line 33) | def add_bool_arguments( method prepare (line 66) | def prepare(self, args) -> None: ... method attach (line 68) | def attach(self, short: bool = False) -> None: ... class GeneralGroup (line 71) | class GeneralGroup(Group): method attach (line 74) | def attach(self, short: bool = False): class ApplicationGroup (line 119) | class ApplicationGroup(Group): method attach (line 122) | def attach(self, short: bool = False): class SocketGroup (line 152) | class SocketGroup(Group): method attach (line 155) | def attach(self, short: bool = False): class HTTPVersionGroup (line 181) | class HTTPVersionGroup(Group): method attach (line 184) | def attach(self, short: bool = False): method prepare (line 216) | def prepare(self, args): class TLSGroup (line 222) | class TLSGroup(Group): method attach (line 225) | def attach(self, short: bool = False): class DevelopmentGroup (line 260) | class DevelopmentGroup(Group): method attach (line 263) | def attach(self, short: bool = False): class WorkerGroup (line 305) | class WorkerGroup(Group): method attach (line 308) | def attach(self, short: bool = False): class OutputGroup (line 341) | class OutputGroup(Group): method attach (line 344) | def attach(self, short: bool = False): class DaemonGroup (line 376) | class DaemonGroup(Group): method attach (line 379) | def attach(self, short: bool = False): method prepare (line 423) | def prepare(self, args): FILE: sanic/cli/base.py class SanicArgumentParser (line 11) | class SanicArgumentParser(ArgumentParser): method _check_value (line 12) | def _check_value(self, action: Action, value: Any) -> None: class SanicHelpFormatter (line 18) | class SanicHelpFormatter(RawTextHelpFormatter): method add_usage (line 19) | def add_usage(self, usage, actions, groups, prefix=None): class SanicSubParsersAction (line 27) | class SanicSubParsersAction(_SubParsersAction): method __call__ (line 28) | def __call__(self, parser, namespace, values, option_string=None): FILE: sanic/cli/console.py class SanicClient (line 44) | class SanicClient(Client): method __init__ (line 45) | def __init__(self, app: Sanic): class REPLProtocol (line 66) | class REPLProtocol(TransportProtocol): method __init__ (line 67) | def __init__(self): method respond (line 71) | def respond(self, response): method send (line 77) | async def send(self, data, end_stream): ... class Result (line 80) | class Result(NamedTuple): function make_request (line 85) | def make_request( function respond (line 109) | async def respond(request) -> HTTPResponse: function do (line 116) | async def do( function _variable_description (line 127) | def _variable_description(name: str, desc: str, type_desc: str) -> str: class SanicREPL (line 134) | class SanicREPL(InteractiveConsole): method __init__ (line 135) | def __init__(self, app: Sanic, start: Default | None = None): method pause (line 226) | def pause(self): method resume (line 231) | def resume(self): method runsource (line 234) | def runsource(self, source, filename="", symbol="single"): method runcode (line 245) | def runcode(self, code): method is_paused (line 262) | def is_paused(self): method _console (line 265) | def _console(self): method _setup_terminal (line 270) | def _setup_terminal(self): method _monitor (line 279) | def _monitor(self): method _shutdown (line 304) | def _shutdown(self): method run (line 307) | def run(self): FILE: sanic/cli/daemon.py function _add_target_args (line 14) | def _add_target_args(parser: ArgumentParser) -> None: function make_kill_parser (line 30) | def make_kill_parser(parser: ArgumentParser) -> None: function make_status_parser (line 35) | def make_status_parser(parser: ArgumentParser) -> None: function make_restart_parser (line 39) | def make_restart_parser(parser: ArgumentParser) -> None: function resolve_target (line 43) | def resolve_target( function _terminate_process (line 71) | def _terminate_process( function kill_daemon (line 112) | def kill_daemon(pid: int, pidfile: Path | None = None) -> None: function stop_daemon (line 117) | def stop_daemon( function status_daemon (line 125) | def status_daemon(pid: int, pidfile: Path | None = None) -> bool: function restart_daemon (line 156) | def restart_daemon(pid: int) -> None: FILE: sanic/cli/executor.py function make_executor_parser (line 16) | def make_executor_parser(parser: ArgumentParser) -> None: class ExecutorSubParser (line 23) | class ExecutorSubParser(ArgumentParser): method __init__ (line 24) | def __init__(self, *args, **kwargs): class Executor (line 31) | class Executor: method __init__ (line 32) | def __init__(self, app: Sanic, kwargs: dict) -> None: method run (line 38) | def run(self, command: str, args: list[str]) -> None: method _make_commands (line 48) | def _make_commands(self) -> dict[str, Callable]: method _make_parser (line 52) | def _make_parser(self) -> SanicArgumentParser: method _add_arguments (line 80) | def _add_arguments(self, parser: ArgumentParser, func: Callable) -> None: FILE: sanic/cli/inspector.py function _add_shared (line 7) | def _add_shared(parser: ArgumentParser) -> None: class InspectorSubParser (line 35) | class InspectorSubParser(ArgumentParser): method __init__ (line 36) | def __init__(self, *args, **kwargs): function make_inspector_parser (line 44) | def make_inspector_parser(parser: ArgumentParser) -> None: FILE: sanic/cli/inspector_client.py class InspectorClient (line 23) | class InspectorClient: method __init__ (line 24) | def __init__( method do (line 44) | def do(self, action: str, **kwargs: Any) -> None: method info (line 57) | def info(self) -> None: method request (line 90) | def request(self, action: str, method: str = "POST", **kwargs: Any) ->... method base_url (line 118) | def base_url(self): FILE: sanic/compat.py class StrEnum (line 37) | class StrEnum(str, Enum): class UpperStrEnum (line 44) | class UpperStrEnum(StrEnum): method _generate_next_value_ (line 47) | def _generate_next_value_(name, start, count, last_values): method __eq__ (line 50) | def __eq__(self, value: object) -> bool: method __hash__ (line 54) | def __hash__(self) -> int: method __str__ (line 57) | def __str__(self) -> str: function use_context (line 62) | def use_context(method: StartMethod): function enable_windows_color_support (line 71) | def enable_windows_color_support(): function pypy_os_module_patch (line 78) | def pypy_os_module_patch() -> None: function pypy_windows_set_console_cp_patch (line 95) | def pypy_windows_set_console_cp_patch() -> None: class Header (line 110) | class Header(CIMultiDict): method __getattr__ (line 122) | def __getattr__(self, key: str) -> str: method get_all (line 128) | def get_all(self, key: str): function stat_async (line 138) | def stat_async(path) -> Awaitable[os.stat_result]: function open_async (line 153) | async def open_async(file, mode="r", **kwargs): function ctrlc_workaround_for_windows (line 159) | def ctrlc_workaround_for_windows(app): function clear_function_annotate (line 183) | def clear_function_annotate(*funcs): FILE: sanic/config.py class DescriptorMeta (line 76) | class DescriptorMeta(ABCMeta): method __init__ (line 79) | def __init__(cls, *_): method _is_setter (line 83) | def _is_setter(member: object): class DetailedConverter (line 87) | class DetailedConverter(ABC): method __call__ (line 110) | def __call__( class Config (line 131) | class Config(dict, metaclass=DescriptorMeta): method __init__ (line 180) | def __init__( method __getattr__ (line 212) | def __getattr__(self, attr: Any): method __setattr__ (line 218) | def __setattr__(self, attr: str, value: Any) -> None: method __setitem__ (line 221) | def __setitem__(self, attr: str, value: Any) -> None: method update (line 224) | def update(self, *other: Any, **kwargs: Any) -> None: method _post_set (line 271) | def _post_set(self, attr, value) -> None: method FALLBACK_ERROR_FORMAT (line 290) | def FALLBACK_ERROR_FORMAT(self) -> str: method FALLBACK_ERROR_FORMAT (line 296) | def FALLBACK_ERROR_FORMAT(self, value): method _configure_header_size (line 308) | def _configure_header_size(self): method _configure_warnings (line 315) | def _configure_warnings(self): method _check_error_format (line 322) | def _check_error_format(self, format: str | None = None): method load_environment_vars (line 325) | def load_environment_vars(self, prefix=SANIC_PREFIX): method update_config (line 383) | def update_config(self, config: bytes | str | dict[str, Any] | Any): method register_type (line 455) | def register_type(self, converter: Callable[[str], Any]) -> None: FILE: sanic/constants.py class HTTPMethod (line 6) | class HTTPMethod(UpperStrEnum): class LocalCertCreator (line 18) | class LocalCertCreator(UpperStrEnum): FILE: sanic/cookies/request.py function _unquote (line 16) | def _unquote(str): # no cov function parse_cookie (line 50) | def parse_cookie(raw: str) -> dict[str, list[str]]: class CookieRequestParameters (line 101) | class CookieRequestParameters(RequestParameters): method __getitem__ (line 127) | def __getitem__(self, key: str) -> str | None: method __getattr__ (line 134) | def __getattr__(self, key: str) -> str: method get (line 140) | def get(self, name: str, default: Any | None = None) -> Any | None: method getlist (line 146) | def getlist( method _get_prefixed_cookie (line 154) | def _get_prefixed_cookie(self, name: str) -> Any: FILE: sanic/cookies/response.py function _quote (line 33) | def _quote(str): # no cov class CookieJar (line 48) | class CookieJar: method __init__ (line 61) | def __init__(self, headers: Header): method __len__ (line 64) | def __len__(self): # no cov method cookies (line 68) | def cookies(self) -> list[Cookie]: method get_cookie (line 76) | def get_cookie( method has_cookie (line 109) | def has_cookie( method add_cookie (line 142) | def add_cookie( method delete_cookie (line 231) | def delete_cookie( class Cookie (line 318) | class Cookie: method __init__ (line 386) | def __init__( method __str__ (line 452) | def __str__(self): method path (line 482) | def path(self) -> str: # no cov method path (line 487) | def path(self, value: str) -> None: # no cov method expires (line 491) | def expires(self) -> datetime | None: # no cov method expires (line 496) | def expires(self, value: datetime) -> None: # no cov method comment (line 502) | def comment(self) -> str | None: # no cov method comment (line 507) | def comment(self, value: str) -> None: # no cov method domain (line 511) | def domain(self) -> str | None: # no cov method domain (line 516) | def domain(self, value: str) -> None: # no cov method max_age (line 520) | def max_age(self) -> int | None: # no cov method max_age (line 525) | def max_age(self, value: int) -> None: # no cov method secure (line 531) | def secure(self) -> bool: # no cov method secure (line 536) | def secure(self, value: bool) -> None: # no cov method httponly (line 540) | def httponly(self) -> bool: # no cov method httponly (line 545) | def httponly(self, value: bool) -> None: # no cov method samesite (line 549) | def samesite(self) -> SameSite | None: # no cov method samesite (line 554) | def samesite(self, value: SameSite) -> None: # no cov method partitioned (line 563) | def partitioned(self) -> bool: # no cov method partitioned (line 568) | def partitioned(self, value: bool) -> None: # no cov method make_key (line 572) | def make_key( FILE: sanic/errorpages.py class BaseRenderer (line 50) | class BaseRenderer: method __init__ (line 71) | def __init__(self, request: Request, exception: Exception, debug: bool): method headers (line 77) | def headers(self) -> t.Dict[str, str]: method status (line 84) | def status(self): method text (line 91) | def text(self): method title (line 98) | def title(self): method render (line 103) | def render(self) -> HTTPResponse: method minimal (line 118) | def minimal(self) -> HTTPResponse: # noqa method full (line 128) | def full(self) -> HTTPResponse: # noqa class HTMLRenderer (line 137) | class HTMLRenderer(BaseRenderer): method full (line 143) | def full(self) -> HTTPResponse: method minimal (line 153) | def minimal(self) -> HTTPResponse: class TextRenderer (line 157) | class TextRenderer(BaseRenderer): method full (line 163) | def full(self) -> HTTPResponse: method minimal (line 173) | def minimal(self) -> HTTPResponse: method title (line 184) | def title(self): method _generate_body (line 187) | def _generate_body(self, *, full): method _format_exc (line 213) | def _format_exc(self, exc): method _generate_object_display_list (line 224) | def _generate_object_display_list(self, obj, descriptor): class JSONRenderer (line 232) | class JSONRenderer(BaseRenderer): method full (line 235) | def full(self) -> HTTPResponse: method minimal (line 239) | def minimal(self) -> HTTPResponse: method _generate_output (line 243) | def _generate_output(self, *, full): method title (line 284) | def title(self): function escape (line 288) | def escape(text): function check_error_format (line 319) | def check_error_format(format): function exception_response (line 325) | def exception_response( function guess_mime (line 342) | def guess_mime(req: Request, fallback: str) -> str: FILE: sanic/exceptions.py class RequestCancelled (line 10) | class RequestCancelled(CancelledError): class ServerKilled (line 14) | class ServerKilled(Exception): class SanicException (line 20) | class SanicException(Exception): method __init__ (line 61) | def __init__( class HTTPException (line 101) | class HTTPException(SanicException): method __init__ (line 104) | def __init__( class NotFound (line 122) | class NotFound(HTTPException): class BadRequest (line 142) | class BadRequest(HTTPException): class MethodNotAllowed (line 166) | class MethodNotAllowed(HTTPException): method __init__ (line 188) | def __init__( class ServerError (line 218) | class ServerError(HTTPException): class ServiceUnavailable (line 243) | class ServiceUnavailable(HTTPException): class URLBuildError (line 266) | class URLBuildError(HTTPException): class FileNotFound (line 287) | class FileNotFound(NotFound): method __init__ (line 309) | def __init__( class RequestTimeout (line 331) | class RequestTimeout(HTTPException): class PayloadTooLarge (line 361) | class PayloadTooLarge(HTTPException): class HeaderNotFound (line 384) | class HeaderNotFound(BadRequest): class InvalidHeader (line 401) | class InvalidHeader(BadRequest): class RangeNotSatisfiable (line 418) | class RangeNotSatisfiable(HTTPException): method __init__ (line 439) | def __init__( class ExpectationFailed (line 466) | class ExpectationFailed(HTTPException): class Forbidden (line 489) | class Forbidden(HTTPException): class InvalidRangeType (line 509) | class InvalidRangeType(RangeNotSatisfiable): class PyFileError (line 529) | class PyFileError(SanicException): method __init__ (line 530) | def __init__( class Unauthorized (line 550) | class Unauthorized(HTTPException): method __init__ (line 613) | def __init__( class LoadFileException (line 643) | class LoadFileException(SanicException): class InvalidSignal (line 647) | class InvalidSignal(SanicException): class WebsocketClosed (line 651) | class WebsocketClosed(SanicException): FILE: sanic/handlers/content_range.py class ContentRangeHandler (line 19) | class ContentRangeHandler(Range): method __init__ (line 29) | def __init__(self, request: Request, stats: os.stat_result) -> None: method __bool__ (line 75) | def __bool__(self): FILE: sanic/handlers/directory.py function _is_path_within_root (line 17) | def _is_path_within_root(path: Path, root: Path) -> bool: class DirectoryHandler (line 34) | class DirectoryHandler: method __init__ (line 52) | def __init__( method handle (line 74) | async def handle(self, request: Request, path: str): method _index (line 104) | def _index(self, location: Path, path: str, debug: bool): method _prepare_file (line 115) | def _prepare_file(self, path: Path) -> dict[str, int | str] | None: method _iter_files (line 138) | def _iter_files(self, location: Path) -> Iterable[FileInfo]: FILE: sanic/handlers/error.py class ErrorHandler (line 12) | class ErrorHandler: method __init__ (line 24) | def __init__( method _full_lookup (line 34) | def _full_lookup(self, exception, route_name: str | None = None): method _add (line 37) | def _add( method add (line 54) | def add(self, exception, handler, route_names: list[str] | None = None): method lookup (line 73) | def lookup(self, exception, route_name: str | None = None): method response (line 112) | def response(self, request, exception): method default (line 147) | def default(self, request: Request, exception: Exception) -> HTTPRespo... method log (line 183) | def log(request: Request, exception: Exception) -> None: FILE: sanic/headers.py class MediaType (line 36) | class MediaType: method __init__ (line 53) | def __init__( method __repr__ (line 71) | def __repr__(self): method __eq__ (line 74) | def __eq__(self, other): method match (line 87) | def match( method has_wildcard (line 136) | def has_wildcard(self) -> bool: method _parse (line 145) | def _parse(cls, mime_with_params: str) -> MediaType | None: class Matched (line 163) | class Matched: method __init__ (line 175) | def __init__(self, mime: str, header: MediaType | None): method __repr__ (line 179) | def __repr__(self): method __str__ (line 182) | def __str__(self): method __bool__ (line 185) | def __bool__(self): method __eq__ (line 188) | def __eq__(self, other: Any) -> bool: method _compare (line 202) | def _compare(self, other) -> tuple[bool, Matched]: method match (line 217) | def match(self, other: str | Matched) -> Matched | None: method parse (line 237) | def parse(cls, raw: str) -> Matched: class AcceptList (line 242) | class AcceptList(list): method match (line 257) | def match(self, *mimes: str, accept_wildcards=True) -> Matched: method __str__ (line 293) | def __str__(self): function parse_accept (line 298) | def parse_accept(accept: str | None) -> AcceptList: function parse_content_header (line 329) | def parse_content_header(value: str) -> tuple[str, Options]: function parse_forwarded (line 368) | def parse_forwarded(headers, config) -> Options | None: function parse_xforwarded (line 406) | def parse_xforwarded(headers, config) -> Options | None: function fwd_normalize (line 444) | def fwd_normalize(fwd: OptionsIterable) -> Options: function fwd_normalize_address (line 472) | def fwd_normalize_address(addr: str) -> str: function parse_host (line 490) | def parse_host(host: str) -> tuple[str | None, int | None]: function format_http1_response (line 512) | def format_http1_response(status: int, headers: HeaderBytesIterable) -> ... function parse_credentials (line 531) | def parse_credentials( FILE: sanic/helpers.py function has_message_body (line 116) | def has_message_body(status): function is_entity_header (line 126) | def is_entity_header(header): function is_hop_by_hop_header (line 131) | def is_hop_by_hop_header(header): function import_string (line 136) | def import_string(module_name, package=None): function is_atty (line 154) | def is_atty() -> bool: class Default (line 158) | class Default: method __repr__ (line 166) | def __repr__(self): method __str__ (line 169) | def __str__(self) -> str: FILE: sanic/http/constants.py class Stage (line 4) | class Stage(Enum): class HTTP (line 22) | class HTTP(IntEnum): method display (line 28) | def display(self) -> str: FILE: sanic/http/http1.py class Http (line 33) | class Http(Stream, metaclass=TouchUpMeta): method __init__ (line 77) | def __init__(self, protocol): method init_for_request (line 86) | def init_for_request(self): method __bool__ (line 101) | def __bool__(self): method http1 (line 105) | async def http1(self): method http1_request_header (line 176) | async def http1_request_header(self): # no cov method http1_response_header (line 295) | async def http1_response_header( method head_response_ignored (line 374) | def head_response_ignored(self, data: bytes, end_stream: bool) -> None: method http1_response_chunked (line 380) | async def http1_response_chunked( method http1_response_normal (line 397) | async def http1_response_normal( method error_response (line 416) | async def error_response(self, exception: Exception) -> None: method create_empty_request (line 443) | def create_empty_request(self) -> None: method log_response (line 471) | def log_response(self) -> None: method __aiter__ (line 494) | async def __aiter__(self): method read (line 502) | async def read(self) -> bytes | None: # no cov method respond (line 585) | def respond(self, response: BaseHTTPResponse) -> BaseHTTPResponse: method send (line 605) | def send(self): method set_header_max_size (line 609) | def set_header_max_size(cls, *sizes: int): method _safe_int (line 616) | def _safe_int(value: str, base: int = 10) -> int: FILE: sanic/http/http3.py class HTTP3Transport (line 52) | class HTTP3Transport(TransportProtocol): method __init__ (line 57) | def __init__(self, protocol: Http3Protocol): method get_protocol (line 60) | def get_protocol(self) -> Http3Protocol: method get_extra_info (line 63) | def get_extra_info(self, info: str, default: Any = None) -> Any: class Receiver (line 76) | class Receiver(ABC): method __init__ (line 81) | def __init__(self, transmit, protocol, request: Request) -> None: method run (line 87) | async def run(self): # no cov class HTTPReceiver (line 91) | class HTTPReceiver(Receiver, Stream): method __init__ (line 97) | def __init__(self, *args, **kwargs) -> None: method run (line 106) | async def run(self, exception: Exception | None = None): method error_response (line 132) | async def error_response(self, exception: Exception) -> None: method _prepare_headers (line 139) | def _prepare_headers( method send_headers (line 169) | def send_headers(self) -> None: method respond (line 193) | def respond(self, response: BaseHTTPResponse) -> BaseHTTPResponse: method receive_body (line 212) | def receive_body(self, data: bytes) -> None: method send (line 220) | async def send(self, data: bytes, end_stream: bool) -> None: method _send (line 229) | def _send(self, data: bytes, end_stream: bool) -> None: class WebsocketReceiver (line 265) | class WebsocketReceiver(Receiver): # noqa method run (line 268) | async def run(self): ... class WebTransportReceiver (line 271) | class WebTransportReceiver(Receiver): # noqa method run (line 274) | async def run(self): ... class Http3 (line 277) | class Http3: method __init__ (line 288) | def __init__( method http_event_received (line 297) | def http_event_received(self, event: H3Event) -> None: method get_or_make_receiver (line 321) | def get_or_make_receiver(self, event: H3Event) -> tuple[Receiver, bool]: method get_receiver_by_stream_id (line 336) | def get_receiver_by_stream_id(self, stream_id: int) -> Receiver: method _make_request (line 339) | def _make_request(self, event: HeadersReceived) -> Request: class SessionTicketStore (line 381) | class SessionTicketStore: method __init__ (line 386) | def __init__(self) -> None: method add (line 389) | def add(self, ticket: SessionTicket) -> None: method pop (line 392) | def pop(self, label: bytes) -> SessionTicket | None: function get_config (line 396) | def get_config(app: Sanic, ssl: SanicSSLContext | CertSelector | SSLCont... FILE: sanic/http/stream.py class Stream (line 13) | class Stream: method respond (line 24) | def respond( FILE: sanic/http/tls/context.py function create_context (line 24) | def create_context( function shorthand_to_ctx (line 42) | def shorthand_to_ctx( function process_to_context (line 58) | def process_to_context( function load_cert_dir (line 69) | def load_cert_dir(p: str) -> ssl.SSLContext: function find_cert (line 85) | def find_cert(self: CertSelector, server_name: str): function match_hostname (line 104) | def match_hostname(ctx: ssl.SSLContext | CertSelector, hostname: str) ->... function selector_sni_callback (line 119) | def selector_sni_callback( function server_name_callback (line 136) | def server_name_callback( class SanicSSLContext (line 143) | class SanicSSLContext(ssl.SSLContext): method create_from_ssl_context (line 147) | def create_from_ssl_context(cls, context: ssl.SSLContext): class CertSimple (line 152) | class CertSimple(SanicSSLContext): method __new__ (line 157) | def __new__(cls, cert, key, **kw): method __init__ (line 178) | def __init__(self, cert, key, **kw): class CertSelector (line 182) | class CertSelector(ssl.SSLContext): method __new__ (line 189) | def __new__(cls, ctxs): method __init__ (line 192) | def __init__(self, ctxs: Iterable[ssl.SSLContext | None]): FILE: sanic/http/tls/creators.py function _make_path (line 50) | def _make_path(maybe_path: Path | str, tmpdir: Path | None) -> Path: function get_ssl_context (line 63) | def get_ssl_context(app: Sanic, ssl: ssl.SSLContext | None) -> ssl.SSLCo... class CertCreator (line 87) | class CertCreator(ABC): method __init__ (line 88) | def __init__(self, app, key, cert) -> None: method check_supported (line 112) | def check_supported(self) -> None: # no cov method generate_cert (line 116) | def generate_cert(self, localhost: str) -> ssl.SSLContext: # no cov method select (line 120) | def select( method _try_select (line 159) | def _try_select( class MkcertCreator (line 186) | class MkcertCreator(CertCreator): method check_supported (line 187) | def check_supported(self) -> None: method generate_cert (line 209) | def generate_cert(self, localhost: str) -> ssl.SSLContext: class TrustmeCreator (line 251) | class TrustmeCreator(CertCreator): method check_supported (line 252) | def check_supported(self) -> None: method generate_cert (line 267) | def generate_cert(self, localhost: str) -> ssl.SSLContext: FILE: sanic/logging/color.py class StrEnum (line 14) | class StrEnum(str, Enum): class Colors (line 25) | class Colors(StrEnum): # no cov FILE: sanic/logging/deprecation.py function deprecation (line 7) | def deprecation(message: str, version: float): # no cov FILE: sanic/logging/filter.py class VerbosityFilter (line 4) | class VerbosityFilter(logging.Filter): method filter (line 11) | def filter(self, record: logging.LogRecord) -> bool: FILE: sanic/logging/formatter.py class AutoFormatter (line 30) | class AutoFormatter(logging.Formatter): method __init__ (line 53) | def __init__(self, *args) -> None: method format (line 66) | def format(self, record: logging.LogRecord) -> str: method _set_levelname (line 74) | def _set_levelname(self, record: logging.LogRecord) -> None: method _make_format (line 82) | def _make_format(self) -> str: method _log_extra (line 91) | def _log_extra(self, record: logging.LogRecord, indent: int = 0) -> str: method _format_key_value (line 100) | def _format_key_value(self, key, value, indent): class DebugFormatter (line 120) | class DebugFormatter(AutoFormatter): method _set_levelname (line 132) | def _set_levelname(self, record: logging.LogRecord) -> None: method formatException (line 137) | def formatException(self, ei): # no cov method _color_exception_line (line 155) | def _color_exception_line(self, line: str) -> str: # no cov method _color_file_line (line 163) | def _color_file_line(self, line: str) -> str: # no cov method _color_code_line (line 175) | def _color_code_line(self, line: str) -> str: # no cov class ProdFormatter (line 179) | class ProdFormatter(AutoFormatter): class LegacyFormatter (line 188) | class LegacyFormatter(AutoFormatter): class AutoAccessFormatter (line 213) | class AutoAccessFormatter(AutoFormatter): method format (line 220) | def format(self, record: logging.LogRecord) -> str: method _set_levelname (line 231) | def _set_levelname(self, record: logging.LogRecord) -> None: class LegacyAccessFormatter (line 236) | class LegacyAccessFormatter(AutoAccessFormatter): class DebugAccessFormatter (line 261) | class DebugAccessFormatter(AutoAccessFormatter): class ProdAccessFormatter (line 268) | class ProdAccessFormatter(AutoAccessFormatter): class JSONFormatter (line 283) | class JSONFormatter(AutoFormatter): method format (line 320) | def format(self, record: logging.LogRecord) -> str: method to_dict (line 323) | def to_dict(self, record: logging.LogRecord) -> dict: method format_dict (line 344) | def format_dict(self, record: dict) -> str: class JSONAccessFormatter (line 348) | class JSONAccessFormatter(JSONFormatter): method to_dict (line 380) | def to_dict(self, record: logging.LogRecord) -> dict: FILE: sanic/logging/setup.py function setup_logging (line 22) | def setup_logging( function _auto_format (line 54) | def _auto_format( FILE: sanic/middleware.py class MiddlewareLocation (line 11) | class MiddlewareLocation(IntEnum): class Middleware (line 16) | class Middleware: method __init__ (line 33) | def __init__( method __call__ (line 44) | def __call__(self, *args, **kwargs): method __hash__ (line 47) | def __hash__(self) -> int: method __repr__ (line 50) | def __repr__(self) -> str: method order (line 59) | def order(self) -> tuple[int, int]: method convert (line 70) | def convert( method reset_count (line 96) | def reset_count(cls) -> None: FILE: sanic/mixins/base.py class NameProtocol (line 8) | class NameProtocol(Protocol): class DunderNameProtocol (line 12) | class DunderNameProtocol(Protocol): class BaseMixin (line 16) | class BaseMixin(metaclass=SanicMeta): method _generate_name (line 22) | def _generate_name( method generate_name (line 44) | def generate_name(self, *objects) -> str: FILE: sanic/mixins/commands.py class CommandMixin (line 11) | class CommandMixin(metaclass=SanicMeta): method __init__ (line 12) | def __init__(self, *args, **kwargs) -> None: method command (line 15) | def command( FILE: sanic/mixins/exceptions.py class ExceptionMixin (line 9) | class ExceptionMixin(metaclass=SanicMeta): method __init__ (line 10) | def __init__(self, *args, **kwargs) -> None: method _apply_exception_handler (line 13) | def _apply_exception_handler(self, handler: FutureException): method exception (line 16) | def exception( method all_exceptions (line 84) | def all_exceptions( FILE: sanic/mixins/listeners.py class ListenerEvent (line 13) | class ListenerEvent(str, Enum): method _generate_next_value_ (line 14) | def _generate_next_value_(name: str, *args) -> str: # type: ignore class ListenerMixin (line 30) | class ListenerMixin(metaclass=SanicMeta): method __init__ (line 31) | def __init__(self, *args, **kwargs) -> None: method _apply_listener (line 34) | def _apply_listener(self, listener: FutureListener): method listener (line 38) | def listener( method listener (line 48) | def listener( method listener (line 57) | def listener( method _setup_listener (line 141) | def _setup_listener( method main_process_start (line 154) | def main_process_start( method main_process_ready (line 178) | def main_process_ready( method main_process_stop (line 203) | def main_process_stop( method reload_process_start (line 226) | def reload_process_start( method reload_process_stop (line 249) | def reload_process_stop( method before_reload_trigger (line 272) | def before_reload_trigger( method after_reload_trigger (line 298) | def after_reload_trigger( method before_server_start (line 322) | def before_server_start( method after_server_start (line 351) | def after_server_start( method before_server_stop (line 381) | def before_server_stop( method after_server_stop (line 408) | def after_server_stop( FILE: sanic/mixins/middleware.py class MiddlewareMixin (line 14) | class MiddlewareMixin(metaclass=SanicMeta): method __init__ (line 17) | def __init__(self, *args, **kwargs) -> None: method _apply_middleware (line 20) | def _apply_middleware(self, middleware: FutureMiddleware): method middleware (line 24) | def middleware( method middleware (line 34) | def middleware( method middleware (line 43) | def middleware( method on_request (line 110) | def on_request(self, middleware=None, *, priority=0) -> MiddlewareType: method on_response (line 137) | def on_response(self, middleware=None, *, priority=0): method finalize_middleware (line 164) | def finalize_middleware(self) -> None: FILE: sanic/mixins/routes.py class RouteMixin (line 30) | class RouteMixin(BaseMixin, metaclass=SanicMeta): method __init__ (line 31) | def __init__(self, *args, **kwargs) -> None: method _apply_route (line 35) | def _apply_route(self, route: FutureRoute) -> list[Route]: method route (line 38) | def route( method add_route (line 213) | def add_route( method get (line 309) | def get( method post (line 362) | def post( method put (line 413) | def put( method head (line 464) | def head( method options (line 517) | def options( method patch (line 570) | def patch( method delete (line 621) | def delete( method websocket (line 671) | def websocket( method add_websocket_route (line 724) | def add_websocket_route( method _determine_error_format (line 771) | def _determine_error_format(self, handler) -> str: method _get_response_types (line 782) | def _get_response_types(self, node): method _build_route_context (line 806) | def _build_route_context(self, raw: dict[str, Any]) -> HashableDict: FILE: sanic/mixins/signals.py class SignalMixin (line 14) | class SignalMixin(metaclass=SanicMeta): method __init__ (line 15) | def __init__(self, *args, **kwargs) -> None: method _apply_signal (line 18) | def _apply_signal(self, signal: FutureSignal) -> Signal: method signal (line 21) | def signal( method add_signal (line 71) | def add_signal( method event (line 105) | def event(self, event: str): method catch_exception (line 108) | def catch_exception( FILE: sanic/mixins/startup.py class StartupMixin (line 82) | class StartupMixin(metaclass=SanicMeta): method setup_loop (line 96) | def setup_loop(self) -> None: method m (line 115) | def m(self) -> WorkerMultiplexer: method make_coffee (line 136) | def make_coffee(self, *args, **kwargs): method run (line 152) | def run( method prepare (line 282) | def prepare( method create_server (line 464) | async def create_server( method stop (line 606) | def stop(self, terminate: bool = True, unregister: bool = False) -> None: method _helper (line 630) | def _helper( method motd (line 723) | def motd( method get_motd_data (line 753) | def get_motd_data( method serve_location (line 828) | def serve_location(self) -> str: method get_server_location (line 842) | def get_server_location( method get_address (line 877) | def get_address( method should_auto_reload (line 899) | def should_auto_reload(cls) -> bool: method _get_startup_method (line 909) | def _get_startup_method(cls) -> str: method _set_startup_method (line 917) | def _set_startup_method(cls) -> None: method _get_context (line 938) | def _get_context(cls) -> BaseContext: method serve (line 951) | def serve( method _get_process_states (line 1208) | def _get_process_states(worker_state) -> list[str]: method serve_single (line 1223) | def serve_single(cls, primary: Sanic | None = None) -> None: method _start_servers (line 1318) | async def _start_servers( method _run_server (line 1398) | async def _run_server( method _cleanup_env_vars (line 1427) | def _cleanup_env_vars(): method _cleanup_apps (line 1443) | def _cleanup_apps(cls): FILE: sanic/mixins/static.py class StaticMixin (line 25) | class StaticMixin(BaseMixin, metaclass=SanicMeta): method __init__ (line 26) | def __init__(self, *args, **kwargs) -> None: method _apply_static (line 29) | def _apply_static(self, static: FutureStatic) -> Route: method static (line 32) | def static( class StaticHandleMixin (line 181) | class StaticHandleMixin(metaclass=SanicMeta): method _apply_static (line 182) | def _apply_static(self, static: FutureStatic) -> Route: method _register_static (line 185) | def _register_static( method _static_request_handler (line 264) | async def _static_request_handler( method _get_file_path (line 364) | async def _get_file_path( FILE: sanic/models/asgi.py class MockProtocol (line 17) | class MockProtocol: # no cov method __init__ (line 18) | def __init__(self, transport: "MockTransport", loop): method pause_writing (line 24) | def pause_writing(self) -> None: method resume_writing (line 27) | def resume_writing(self) -> None: method complete (line 30) | async def complete(self) -> None: method is_complete (line 37) | def is_complete(self) -> bool: method push_data (line 40) | async def push_data(self, data: bytes) -> None: method drain (line 46) | async def drain(self) -> None: class MockTransport (line 50) | class MockTransport(TransportProtocol): # no cov method __init__ (line 53) | def __init__( method get_protocol (line 62) | def get_protocol(self) -> MockProtocol: # type: ignore method get_extra_info (line 67) | def get_extra_info(self, info: str, default=None) -> str | bool | None: method get_websocket_connection (line 74) | def get_websocket_connection(self) -> WebSocketConnection: method create_websocket_connection (line 80) | def create_websocket_connection( method add_task (line 88) | def add_task(self) -> None: method send (line 91) | async def send(self, data) -> None: method receive (line 96) | async def receive(self) -> ASGIMessage: FILE: sanic/models/ctx_types.py class REPLLocal (line 4) | class REPLLocal(NamedTuple): class REPLContext (line 10) | class REPLContext: method __init__ (line 18) | def __init__(self): method add (line 21) | def add( method __setattr__ (line 57) | def __setattr__(self, name: str, value: Any): method __iter__ (line 63) | def __iter__(self): method _truncate (line 67) | def _truncate(s: str, limit: int = 40) -> str: FILE: sanic/models/futures.py class FutureRoute (line 15) | class FutureRoute(NamedTuple): class FutureListener (line 34) | class FutureListener(NamedTuple): class FutureMiddleware (line 40) | class FutureMiddleware(NamedTuple): class FutureException (line 45) | class FutureException(NamedTuple): class FutureStatic (line 50) | class FutureStatic(NamedTuple): class FutureSignal (line 67) | class FutureSignal(NamedTuple): class FutureRegistry (line 75) | class FutureRegistry(set): ... class FutureCommand (line 78) | class FutureCommand(NamedTuple): FILE: sanic/models/http_types.py class Credentials (line 8) | class Credentials: method __post_init__ (line 14) | def __post_init__(self): method username (line 21) | def username(self): method password (line 27) | def password(self): method _auth_is_basic (line 33) | def _auth_is_basic(self) -> bool: FILE: sanic/models/protocol_types.py class HTMLProtocol (line 12) | class HTMLProtocol(Protocol): method __html__ (line 13) | def __html__(self) -> str | bytes: ... method _repr_html_ (line 15) | def _repr_html_(self) -> str | bytes: ... class Range (line 18) | class Range(Protocol): class TransportProtocol (line 26) | class TransportProtocol(BaseTransport): FILE: sanic/models/server_types.py class Signal (line 10) | class Signal: class ConnInfo (line 14) | class ConnInfo: method __init__ (line 35) | def __init__(self, transport: TransportProtocol, unix=None): FILE: sanic/pages/base.py class BasePage (line 10) | class BasePage(ABC, metaclass=CSS): # no cov method __init__ (line 18) | def __init__(self, debug: bool = True) -> None: method style (line 22) | def style(self) -> str: method render (line 30) | def render(self) -> str: method _head (line 42) | def _head(self) -> None: method _foot (line 47) | def _foot(self) -> None: method _body (line 73) | def _body(self) -> None: ... method _sanic_logo (line 75) | def _sanic_logo(self) -> None: FILE: sanic/pages/css.py function _extract_style (line 8) | def _extract_style(maybe_style: str | None, name: str) -> str: class CSS (line 20) | class CSS(ABCMeta): method __new__ (line 23) | def __new__(cls, name, bases, attrs): FILE: sanic/pages/directory_page.py class FileInfo (line 9) | class FileInfo(TypedDict): class DirectoryPage (line 18) | class DirectoryPage(BasePage): # no cov method __init__ (line 23) | def __init__( method _body (line 30) | def _body(self) -> None: method _headline (line 39) | def _headline(self): method _file_table (line 50) | def _file_table(self, files: Iterable[FileInfo]): method _file_row (line 55) | def _file_row( FILE: sanic/pages/error.py class ErrorPage (line 25) | class ErrorPage(BasePage): method __init__ (line 30) | def __init__( method _head (line 52) | def _head(self) -> None: method _body (line 56) | def _body(self) -> None: method _key_value_table (line 98) | def _key_value_table( FILE: sanic/request/form.py class File (line 15) | class File(NamedTuple): function parse_multipart_form (line 32) | def parse_multipart_form(body, boundary): FILE: sanic/request/parameters.py class RequestParameters (line 6) | class RequestParameters(dict): method get (line 9) | def get(self, name: str, default: Any | None = None) -> Any | None: method getlist (line 21) | def getlist( FILE: sanic/request/types.py class Request (line 86) | class Request(Generic[sanic_type, ctx_type]): method __init__ (line 144) | def __init__( method __repr__ (line 198) | def __repr__(self): method make_context (line 203) | def make_context() -> ctx_type: method get_current (line 218) | def get_current(cls) -> Request: method generate_id (line 251) | def generate_id(*_) -> uuid.UUID | str | int: method ctx (line 263) | def ctx(self) -> ctx_type: method stream_id (line 278) | def stream_id(self) -> int: method reset_response (line 293) | def reset_response(self) -> None: method respond (line 318) | async def respond( method receive_body (line 411) | async def receive_body(self): method name (line 424) | def name(self) -> str | None: method endpoint (line 443) | def endpoint(self) -> str | None: method uri_template (line 452) | def uri_template(self) -> str | None: method protocol (line 463) | def protocol(self) -> TransportProtocol: method raw_headers (line 474) | def raw_headers(self) -> bytes: method request_line (line 484) | def request_line(self) -> bytes: method id (line 494) | def id(self) -> uuid.UUID | str | int | None: method json (line 543) | def json(self) -> Any: method load_json (line 554) | def load_json(self, loads=None) -> Any: method accept (line 579) | def accept(self) -> AcceptList: method token (line 593) | def token(self) -> str | None: method credentials (line 608) | def credentials(self) -> Credentials | None: method get_form (line 631) | def get_form( method form (line 670) | def form(self) -> RequestParameters | None: method files (line 682) | def files(self) -> RequestParameters | None: method get_args (line 693) | def get_args( method get_query_args (line 752) | def get_query_args( method get_cookies (line 809) | def get_cookies(self) -> RequestParameters: method cookies (line 815) | def cookies(self) -> RequestParameters: method content_type (line 827) | def content_type(self) -> str: method match_info (line 836) | def match_info(self) -> dict[str, Any]: method match_info (line 845) | def match_info(self, value): method ip (line 849) | def ip(self) -> str: method port (line 858) | def port(self) -> int: method socket (line 867) | def socket(self) -> tuple[str, int] | tuple[None, None]: method path (line 882) | def path(self) -> str: method network_paths (line 891) | def network_paths(self) -> list[Any] | None: method forwarded (line 904) | def forwarded(self) -> Options: method remote_addr (line 926) | def remote_addr(self) -> str: method client_ip (line 937) | def client_ip(self) -> str: method scheme (line 953) | def scheme(self) -> str: method host (line 987) | def host(self) -> str: method server_name (line 1007) | def server_name(self) -> str: method server_port (line 1016) | def server_port(self) -> int: method server_path (line 1028) | def server_path(self) -> str: method query_string (line 1037) | def query_string(self) -> str: method url (line 1049) | def url(self) -> str: method url_for (line 1059) | def url_for(self, view_name: str, **kwargs) -> str: method scope (line 1097) | def scope(self) -> ASGIScope: method is_safe (line 1115) | def is_safe(self) -> bool: method is_idempotent (line 1126) | def is_idempotent(self) -> bool: method is_cacheable (line 1137) | def is_cacheable(self) -> bool: FILE: sanic/response/convenience.py function empty (line 21) | def empty( function json (line 36) | def json( function text (line 67) | def text( function raw (line 97) | def raw( function html (line 122) | def html( function validate_file (line 153) | async def validate_file( function file (line 206) | async def file( function redirect (line 304) | def redirect( function file_stream (line 334) | async def file_stream( function guess_content_type (line 402) | def guess_content_type( FILE: sanic/response/types.py class BaseHTTPResponse (line 29) | class BaseHTTPResponse: method __init__ (line 44) | def __init__(self): method __repr__ (line 53) | def __repr__(self): method _encode_body (line 57) | def _encode_body(self, data: str | bytes | None): method cookies (line 63) | def cookies(self) -> CookieJar: method processed_headers (line 76) | def processed_headers(self) -> Iterator[tuple[bytes, bytes]]: method send (line 92) | async def send( method add_cookie (line 122) | def add_cookie( method delete_cookie (line 177) | def delete_cookie( class HTTPResponse (line 212) | class HTTPResponse(BaseHTTPResponse): method __init__ (line 224) | def __init__( method eof (line 239) | async def eof(self): method __aenter__ (line 243) | async def __aenter__(self): method __aexit__ (line 246) | async def __aexit__(self, *_): class JSONResponse (line 250) | class JSONResponse(HTTPResponse): method __init__ (line 275) | def __init__( method _check_body_not_manually_set (line 303) | def _check_body_not_manually_set(self): method raw_body (line 310) | def raw_body(self) -> Any: method raw_body (line 326) | def raw_body(self, value: Any): method body (line 334) | def body(self) -> bytes | None: # type: ignore method body (line 343) | def body(self, value: bytes | None): method set_body (line 349) | def set_body( method append (line 381) | def append(self, value: Any) -> None: method extend (line 401) | def extend(self, value: Any) -> None: method update (line 421) | def update(self, *args, **kwargs) -> None: method pop (line 442) | def pop(self, key: Any, default: Any = _default) -> Any: class ResponseStream (line 478) | class ResponseStream: method __init__ (line 496) | def __init__( method write (line 517) | async def write(self, message: str): method stream (line 520) | async def stream(self) -> HTTPResponse: method eof (line 531) | async def eof(self) -> None: method cookies (line 535) | def cookies(self) -> CookieJar: method processed_headers (line 541) | def processed_headers(self): method body (line 545) | def body(self): method __call__ (line 548) | def __call__(self, request: Request) -> ResponseStream: method __await__ (line 552) | def __await__(self): FILE: sanic/router.py class Router (line 25) | class Router(BaseRouter): method _get (line 31) | def _get( method get (line 52) | def get( # type: ignore method add (line 78) | def add( # type: ignore method find_route_by_view_name (line 167) | def find_route_by_view_name( method routes_all (line 193) | def routes_all(self) -> dict[tuple[str, ...], Route]: method routes_static (line 202) | def routes_static(self) -> dict[tuple[str, ...], RouteGroup]: method routes_dynamic (line 215) | def routes_dynamic(self) -> dict[tuple[str, ...], RouteGroup]: method routes_regex (line 226) | def routes_regex(self) -> dict[tuple[str, ...], RouteGroup]: method finalize (line 237) | def finalize(self, *args, **kwargs) -> None: method _normalize (line 254) | def _normalize(self, uri: str, handler: RouteHandler) -> str: FILE: sanic/server/async_server.py class AsyncioServer (line 12) | class AsyncioServer: method __init__ (line 17) | def __init__( method startup (line 32) | def startup(self): method before_start (line 36) | def before_start(self): method after_start (line 40) | def after_start(self): method before_stop (line 44) | def before_stop(self): method after_stop (line 48) | def after_stop(self): method is_serving (line 52) | def is_serving(self) -> bool: method wait_closed (line 58) | def wait_closed(self): method close (line 63) | def close(self): method start_serving (line 71) | def start_serving(self): method serve_forever (line 75) | def serve_forever(self): method _serve (line 79) | def _serve(self, serve_func): method _server_event (line 96) | def _server_event(self, concern: str, action: str): method __await__ (line 104) | def __await__(self): FILE: sanic/server/events.py function trigger_events (line 12) | def trigger_events( FILE: sanic/server/goodbye.py function get_goodbye (line 28) | def get_goodbye() -> str: # pragma: no cover FILE: sanic/server/loop.py function try_use_uvloop (line 10) | def try_use_uvloop() -> None: function try_windows_loop (line 50) | def try_windows_loop(): FILE: sanic/server/protocols/base_protocol.py class SanicProtocol (line 20) | class SanicProtocol(asyncio.Protocol): method __init__ (line 36) | def __init__( method ctx (line 61) | def ctx(self): method send (line 67) | async def send(self, data): method receive_more (line 77) | async def receive_more(self): method close (line 85) | def close(self, timeout: float | None = None): method abort (line 131) | def abort(self): method connection_made (line 142) | def connection_made(self, transport): method connection_lost (line 155) | def connection_lost(self, exc): method pause_writing (line 178) | def pause_writing(self): method resume_writing (line 181) | def resume_writing(self): method data_received (line 184) | def data_received(self, data: bytes): function _async_protocol_transport_close (line 196) | def _async_protocol_transport_close( FILE: sanic/server/protocols/http_protocol.py class HttpProtocolMixin (line 52) | class HttpProtocolMixin: method _setup_connection (line 56) | def _setup_connection(self, *args, **kwargs): method _setup (line 64) | def _setup(self): method http (line 76) | def http(self): method version (line 82) | def version(self): class HttpProtocol (line 86) | class HttpProtocol(HttpProtocolMixin, SanicProtocol, metaclass=TouchUpMe... method __init__ (line 122) | def __init__( method connection_task (line 148) | async def connection_task(self): # no cov method log_disconnect (line 190) | def log_disconnect(self): method check_timeouts (line 208) | def check_timeouts(self): method close (line 254) | def close(self, timeout: float | None = None): method send (line 263) | async def send(self, data): # no cov method close_if_idle (line 278) | def close_if_idle(self) -> bool: method connection_made (line 293) | def connection_made(self, transport): method data_received (line 308) | def data_received(self, data: bytes): class Http3Protocol (line 327) | class Http3Protocol(HttpProtocolMixin, ConnectionProtocol): # type: ignore method __init__ (line 331) | def __init__(self, *args, app: Sanic, **kwargs) -> None: method quic_event_received (line 337) | def quic_event_received(self, event: QuicEvent) -> None: method connection (line 359) | def connection(self) -> H3Connection | None: FILE: sanic/server/protocols/websocket_protocol.py class WebSocketProtocol (line 29) | class WebSocketProtocol(HttpProtocol): method __init__ (line 40) | def __init__( method connection_lost (line 58) | def connection_lost(self, exc): method data_received (line 66) | def data_received(self, data): method eof_received (line 74) | def eof_received(self) -> bool | None: method close (line 80) | def close(self, timeout: float | None = None): method close_if_idle (line 91) | def close_if_idle(self): method sanic_request_to_ws_request (line 105) | def sanic_request_to_ws_request(request: Request): method websocket_handshake (line 111) | async def websocket_handshake( method log_websocket (line 176) | def log_websocket(self, message): FILE: sanic/server/runners.py function serve (line 42) | def serve( function _setup_system_signals (line 159) | def _setup_system_signals( function _run_shutdown_coro (line 179) | def _run_shutdown_coro(loop, coro): function _run_server_forever (line 207) | def _run_server_forever(loop, before_stop, after_stop, cleanup, unix, pid): function _serve_http_1 (line 232) | def _serve_http_1( function _serve_http_3 (line 353) | def _serve_http_3( function _build_protocol_kwargs (line 395) | def _build_protocol_kwargs( FILE: sanic/server/socket.py function bind_socket (line 14) | def bind_socket(host: str, port: int, *, backlog=100) -> socket.socket: function bind_unix_socket (line 38) | def bind_unix_socket( function remove_unix_socket (line 81) | def remove_unix_socket(path: Path | str | None) -> None: function configure_socket (line 98) | def configure_socket( FILE: sanic/server/websockets/connection.py class WebSocketConnection (line 10) | class WebSocketConnection: method __init__ (line 20) | def __init__( method send (line 30) | async def send(self, data: str | bytes, *args, **kwargs) -> None: method recv (line 40) | async def recv(self, *args, **kwargs) -> str | bytes | None: method accept (line 58) | async def accept(self, subprotocols: list[str] | None = None) -> None: method close (line 73) | async def close(self, code: int = 1000, reason: str = "") -> None: method subprotocols (line 77) | def subprotocols(self): method subprotocols (line 81) | def subprotocols(self, subprotocols: list[str] | None = None): FILE: sanic/server/websockets/frame.py class WebsocketFrameAssembler (line 19) | class WebsocketFrameAssembler: method __init__ (line 55) | def __init__(self, protocol) -> None: method get (line 89) | async def get(self, timeout: float | None = None) -> Data | None: method get_iter (line 167) | async def get_iter(self) -> AsyncIterator[Data]: method put (line 236) | async def put(self, frame: Frame) -> None: FILE: sanic/server/websockets/impl.py class WebsocketImplProtocol (line 35) | class WebsocketImplProtocol: method __init__ (line 60) | def __init__( method subprotocol (line 90) | def subprotocol(self): method pause_frames (line 93) | def pause_frames(self): method resume_frames (line 107) | def resume_frames(self): method connection_made (line 124) | async def connection_made( method wait_for_connection_lost (line 156) | async def wait_for_connection_lost(self, timeout=None) -> bool: method process_events (line 181) | async def process_events(self, events: Sequence[Event]) -> None: method process_pong (line 200) | async def process_pong(self, frame: Frame) -> None: method keepalive_ping (line 216) | async def keepalive_ping(self) -> None: method _force_disconnect (line 264) | def _force_disconnect(self) -> bool: method fail_connection (line 285) | def fail_connection(self, code: int = 1006, reason: str = "") -> bool: method end_connection (line 340) | def end_connection(self, code=1000, reason=""): method auto_close_connection (line 379) | async def auto_close_connection(self) -> None: method abort_pings (line 470) | def abort_pings(self) -> None: method close (line 489) | async def close(self, code: int = 1000, reason: str = "") -> None: method recv (line 509) | async def recv(self, timeout: float | None = None) -> Data | None: method recv_burst (line 568) | async def recv_burst(self, max_recv=256) -> Sequence[Data]: method recv_streaming (line 639) | async def recv_streaming(self) -> AsyncIterator[Data]: method send (line 675) | async def send(self, message: Data | Iterable[Data]) -> None: method ping (line 726) | async def ping(self, data: Data | None = None) -> asyncio.Future: method pong (line 774) | async def pong(self, data: Data = b"") -> None: method send_data (line 792) | async def send_data(self, data_to_send): method async_data_received (line 811) | async def async_data_received(self, data_to_send, events_to_process): method data_received (line 819) | def data_received(self, data): method async_eof_received (line 828) | async def async_eof_received(self, data_to_send, events_to_process): method eof_received (line 850) | def eof_received(self) -> bool | None: method connection_lost (line 859) | def connection_lost(self, exc): method __aiter__ (line 873) | async def __aiter__(self): FILE: sanic/signals.py class Event (line 20) | class Event(Enum): function _blank (line 83) | def _blank(): ... class Signal (line 86) | class Signal(Route): class SignalWaiter (line 91) | class SignalWaiter: method wait (line 102) | async def wait(self): method matches (line 115) | def matches(self, event, condition): class SignalGroup (line 123) | class SignalGroup(RouteGroup): class SignalRouter (line 127) | class SignalRouter(BaseRouter): method __init__ (line 130) | def __init__(self) -> None: method format_event (line 141) | def format_event(event: str | Enum) -> str: method get (line 156) | def get( # type: ignore method _dispatch (line 205) | async def _dispatch( method dispatch (line 265) | async def dispatch( method get_waiter (line 309) | def get_waiter( method _get_event_parts (line 331) | def _get_event_parts(self, event: str) -> tuple[str, str, str]: method add (line 345) | def add( # type: ignore method finalize (line 372) | def finalize(self, do_compile: bool = True, do_optimize: bool = False): method _build_event_parts (line 397) | def _build_event_parts(self, event: str) -> tuple[str, str, str]: method _clean_trigger (line 416) | def _clean_trigger(self, trigger: str) -> str: FILE: sanic/simple.py function create_simple_server (line 7) | def create_simple_server(directory: Path): FILE: sanic/startup/errors.py function maybe_handle_startup_error (line 14) | def maybe_handle_startup_error(exc: Exception) -> None: function _handle_os_error (line 21) | def _handle_os_error(exc: Exception) -> bool: function _handle_server_error (line 40) | def _handle_server_error(exc: Exception) -> bool: function _handle_daemon_error (line 48) | def _handle_daemon_error(exc: Exception) -> bool: FILE: sanic/touchup/meta.py class TouchUpMeta (line 7) | class TouchUpMeta(SanicMeta): method __new__ (line 8) | def __new__(cls, name, bases, attrs, **kwargs): FILE: sanic/touchup/schemes/altsvc.py class AltSvcCheck (line 15) | class AltSvcCheck(BaseScheme): method visitors (line 18) | def visitors(self) -> list[NodeTransformer]: class RemoveAltSvc (line 22) | class RemoveAltSvc(NodeTransformer): method __init__ (line 23) | def __init__(self, app: Sanic, verbosity: int = 0) -> None: method visit_Assign (line 30) | def visit_Assign(self, node: Assign) -> Any: method _should_remove (line 38) | def _should_remove(self) -> bool: method _matches (line 42) | def _matches(node) -> bool: method value (line 49) | def value(self): FILE: sanic/touchup/schemes/base.py class BaseScheme (line 8) | class BaseScheme(ABC): method __init__ (line 12) | def __init__(self, app) -> None: method visitors (line 16) | def visitors(self) -> list[NodeTransformer]: ... method __init_subclass__ (line 18) | def __init_subclass__(cls): method __call__ (line 21) | def __call__(self): method build (line 25) | def build(cls, method, module_globals, app): FILE: sanic/touchup/schemes/ode.py class OptionalDispatchEvent (line 9) | class OptionalDispatchEvent(BaseScheme): method __init__ (line 13) | def __init__(self, app) -> None: method visitors (line 21) | def visitors(self) -> list[NodeTransformer]: method _sync_events (line 24) | def _sync_events(self): method noop (line 50) | async def noop(**_): # no cov class RemoveDispatch (line 54) | class RemoveDispatch(NodeTransformer): method __init__ (line 55) | def __init__(self, registered_events) -> None: method visit_Expr (line 58) | def visit_Expr(self, node: Expr) -> Any: method _not_registered (line 79) | def _not_registered(self, event_name): FILE: sanic/touchup/service.py class TouchUp (line 6) | class TouchUp: method run (line 10) | def run(cls, app): method register (line 29) | def register(cls, target, method_name): FILE: sanic/types/hashable_dict.py class HashableDict (line 1) | class HashableDict(dict): method __hash__ (line 2) | def __hash__(self): FILE: sanic/types/shared_ctx.py class SharedContext (line 10) | class SharedContext(SimpleNamespace): method __init__ (line 13) | def __init__(self, **kwargs: Any) -> None: method __setattr__ (line 17) | def __setattr__(self, name: str, value: Any) -> None: method _check (line 32) | def _check(self, name: str, value: Any) -> None: method is_locked (line 54) | def is_locked(self) -> bool: method lock (line 57) | def lock(self) -> None: FILE: sanic/utils.py function str_to_bool (line 12) | def str_to_bool(val: str) -> bool: function load_module_from_file_location (line 54) | def load_module_from_file_location( FILE: sanic/views.py class HTTPMethodView (line 19) | class HTTPMethodView: method __init_subclass__ (line 117) | def __init_subclass__( method dispatch_request (line 144) | def dispatch_request(self, request: Request, *args, **kwargs): method as_view (line 160) | def as_view(cls, *class_args: Any, **class_kwargs: Any) -> RouteHandler: method attach (line 203) | def attach( function stream (line 242) | def stream(func): FILE: sanic/worker/constants.py class RestartOrder (line 6) | class RestartOrder(UpperStrEnum): class ProcessState (line 13) | class ProcessState(IntEnum): FILE: sanic/worker/daemon.py function _get_default_runtime_dir (line 25) | def _get_default_runtime_dir() -> Path: function _sanitize_name (line 61) | def _sanitize_name(name: str) -> str: function _process_exists (line 70) | def _process_exists(pid: int) -> bool: function _is_sanic_process (line 78) | def _is_sanic_process(pid: int) -> bool: class PidfileInfo (line 96) | class PidfileInfo: class DaemonError (line 102) | class DaemonError(Exception): class Daemon (line 106) | class Daemon: method __init__ (line 119) | def __init__( method get_pidfile_path (line 162) | def get_pidfile_path(name: str) -> Path: method validate (line 175) | def validate(self) -> None: method daemonize (line 180) | def daemonize(self) -> None: method drop_privileges (line 230) | def drop_privileges(self) -> None: method _validate_user_group (line 274) | def _validate_user_group(self) -> None: method _validate_paths (line 296) | def _validate_paths(self) -> None: method _validate_runtime_state (line 310) | def _validate_runtime_state(self) -> None: method _validate_writable_dir (line 322) | def _validate_writable_dir(self, path: Path, label: str) -> None: method _write_pidfile (line 331) | def _write_pidfile(self) -> None: method _remove_pidfile (line 361) | def _remove_pidfile(self) -> None: method read_pidfile (line 371) | def read_pidfile(pidfile: str | Path) -> int | None: method read_pidfile_info (line 376) | def read_pidfile_info(pidfile: str | Path) -> PidfileInfo | None: method _acquire_lockfile (line 410) | def _acquire_lockfile(self) -> None: method _release_lockfile (line 439) | def _release_lockfile(self) -> None: method _redirect_streams (line 468) | def _redirect_streams(self) -> None: method _setup_signal_handlers (line 495) | def _setup_signal_handlers(self) -> None: FILE: sanic/worker/inspector.py class Inspector (line 18) | class Inspector: method __init__ (line 40) | def __init__( method __call__ (line 60) | def __call__(self, run=True, **_) -> Inspector: method _setup (line 77) | def _setup(self): method _authentication (line 84) | def _authentication(self, request: Request) -> None: method _action (line 88) | async def _action(self, request: Request, action: str): method _info (line 103) | async def _info(self, request: Request): method _respond (line 106) | async def _respond(self, request: Request, output: Any): method _state_to_json (line 110) | def _state_to_json(self) -> dict[str, Any]: method _make_safe (line 116) | def _make_safe(obj: dict[str, Any]) -> dict[str, Any]: method reload (line 124) | def reload(self, zero_downtime: bool = False) -> None: method scale (line 136) | def scale(self, replicas: str | int) -> str: method shutdown (line 154) | def shutdown(self) -> None: FILE: sanic/worker/loader.py class AppLoader (line 23) | class AppLoader: method __init__ (line 38) | def __init__( method load (line 69) | def load(self) -> SanicApp: class CertLoader (line 134) | class CertLoader: method __init__ (line 140) | def __init__( method load (line 162) | def load(self, app: SanicApp): FILE: sanic/worker/manager.py class MonitorCycle (line 32) | class MonitorCycle(IntEnum): class WorkerManager (line 37) | class WorkerManager: method __init__ (line 65) | def __init__( method manage (line 96) | def manage( method create_server (line 154) | def create_server(self) -> Worker: method shutdown_server (line 170) | def shutdown_server(self, name: str | None = None) -> None: method run (line 197) | def run(self): method start (line 205) | def start(self): method join (line 214) | def join(self): method terminate (line 230) | def terminate(self): method cleanup (line 236) | def cleanup(self): method restart (line 241) | def restart( method scale (line 263) | def scale(self, num_worker: int): method monitor (line 285) | def monitor(self): method wait_for_ack (line 312) | def wait_for_ack(self): # no cov method workers (line 347) | def workers(self) -> list[Worker]: method all_workers (line 352) | def all_workers(self) -> Iterable[tuple[str, Worker]]: method processes (line 356) | def processes(self): method transient_processes (line 365) | def transient_processes(self): method durable_processes (line 371) | def durable_processes(self): method kill (line 375) | def kill(self): method shutdown_signal (line 390) | def shutdown_signal(self, signal, frame): method shutdown (line 402) | def shutdown(self): method remove_worker (line 409) | def remove_worker(self, worker: Worker) -> None: method pid (line 429) | def pid(self): method _all_workers_ack (line 433) | def _all_workers_ack(self): method _sync_states (line 441) | def _sync_states(self): method _cleanup_non_tracked_workers (line 456) | def _cleanup_non_tracked_workers(self) -> None: method _poll_monitor (line 466) | def _poll_monitor(self) -> MonitorCycle | None: method _handle_terminate (line 488) | def _handle_terminate(self) -> None: method _handle_message (line 491) | def _handle_message(self, message: str) -> MonitorCycle | None: method _handle_manage (line 522) | def _handle_manage( FILE: sanic/worker/multiplexer.py class WorkerMultiplexer (line 12) | class WorkerMultiplexer: method __init__ (line 23) | def __init__( method ack (line 31) | def ack(self): method manage (line 44) | def manage( method set_serving (line 86) | def set_serving(self, serving: bool) -> None: method exit (line 97) | def exit(self): method restart (line 104) | def restart( method scale (line 133) | def scale(self, num_workers: int): method terminate (line 142) | def terminate(self, early: bool = False): method pid (line 152) | def pid(self) -> int: method name (line 157) | def name(self) -> str: method state (line 162) | def state(self): method workers (line 167) | def workers(self) -> dict[str, Any]: FILE: sanic/worker/process.py function get_now (line 18) | def get_now(): class WorkerProcess (line 23) | class WorkerProcess: method __init__ (line 30) | def __init__( method set_state (line 54) | def set_state(self, state: ProcessState, force=False): method start (line 63) | def start(self): method join (line 84) | def join(self): method exit (line 88) | def exit(self): method terminate (line 107) | def terminate(self): method restart (line 125) | def restart(self, restart_order=RestartOrder.SHUTDOWN_FIRST, **kwargs): method is_alive (line 157) | def is_alive(self): method spawn (line 163) | def spawn(self): method pid (line 174) | def pid(self): method exitcode (line 178) | def exitcode(self): method _terminate_now (line 181) | def _terminate_now(self): method _terminate_soon (line 193) | def _terminate_soon(self): method _wait_to_terminate (line 204) | def _wait_to_terminate(self): method _add_config (line 232) | def _add_config(self) -> bool: class Worker (line 242) | class Worker: method __init__ (line 245) | def __init__( method create_process (line 272) | def create_process(self) -> WorkerProcess: method has_alive_processes (line 291) | def has_alive_processes(self) -> bool: FILE: sanic/worker/reloader.py class Reloader (line 18) | class Reloader: method __init__ (line 21) | def __init__( method __call__ (line 34) | def __call__(self) -> None: method stop (line 72) | def stop(self, *_): method reload (line 75) | def reload(self, reloaded_files): method files (line 79) | def files(self): method python_files (line 85) | def python_files(self): # no cov method check_file (line 111) | def check_file(filename, mtimes) -> bool: FILE: sanic/worker/restarter.py class Restarter (line 8) | class Restarter: method restart (line 9) | def restart( method _restart_transient (line 43) | def _restart_transient( method _restart_durable (line 60) | def _restart_durable( method _restart_process (line 89) | def _restart_process(self, process, restart_order, **kwargs): FILE: sanic/worker/serve.py function worker_serve (line 26) | def worker_serve( FILE: sanic/worker/state.py class WorkerState (line 8) | class WorkerState(Mapping): method __init__ (line 20) | def __init__(self, state: dict[str, Any], current: str) -> None: method __getitem__ (line 24) | def __getitem__(self, key: str) -> Any: method __setitem__ (line 27) | def __setitem__(self, key: str, value: Any) -> None: method __delitem__ (line 35) | def __delitem__(self, key: str) -> None: method __iter__ (line 42) | def __iter__(self) -> Iterator[Any]: method __len__ (line 45) | def __len__(self) -> int: method __repr__ (line 48) | def __repr__(self) -> str: method __eq__ (line 51) | def __eq__(self, other: object) -> bool: method keys (line 54) | def keys(self) -> KeysView[str]: method values (line 57) | def values(self) -> ValuesView[Any]: method items (line 60) | def items(self) -> ItemsView[str, Any]: method update (line 63) | def update(self, mapping: MappingType[str, Any]) -> None: method pop (line 73) | def pop(self) -> None: method full (line 76) | def full(self) -> dict[str, Any]: method _write_error (line 79) | def _write_error(self, keys: list[str]) -> None: FILE: scripts/changelog.py function _main (line 46) | def _main( FILE: scripts/release.py class Directory (line 64) | class Directory: method __init__ (line 65) | def __init__(self): method __enter__ (line 69) | def __enter__(self): method __exit__ (line 72) | def __exit__(self, exc_type, exc_val, exc_tb): function _run_shell_command (line 76) | def _run_shell_command(command: list): function _fetch_default_calendar_release_version (line 88) | def _fetch_default_calendar_release_version(): function _fetch_current_version (line 92) | def _fetch_current_version(config_file: str) -> str: function _change_micro_version (line 105) | def _change_micro_version(current_version: str): function _get_new_version (line 111) | def _get_new_version( function _get_current_tag (line 127) | def _get_current_tag(git_command_name="get_tag"): function _update_release_version_for_sanic (line 137) | def _update_release_version_for_sanic( function _generate_change_log (line 188) | def _generate_change_log(current_version: str = None): function _generate_markdown_document (line 210) | def _generate_markdown_document( function _tag_release (line 224) | def _tag_release(new_version, current_version, milestone, release_name, ... function release (line 253) | def release(args: Namespace): FILE: setup.py class PyTest (line 14) | class PyTest(TestCommand): method initialize_options (line 21) | def initialize_options(self): method run_tests (line 25) | def run_tests(self): function open_local (line 34) | def open_local(paths, mode="r", encoding="utf8"): function str_to_bool (line 40) | def str_to_bool(val: str) -> bool: FILE: tests/asyncmock.py class AsyncMock (line 9) | class AsyncMock(Mock): method __init__ (line 10) | def __init__(self, *args, **kwargs): method __call__ (line 14) | def __call__(self, *args, **kwargs): method __await__ (line 24) | def __await__(self): method reset_mock (line 27) | def reset_mock(self, *args, **kwargs): method assert_awaited_once (line 31) | def assert_awaited_once(self): method assert_awaited_once_with (line 39) | def assert_awaited_once_with(self, *args, **kwargs): FILE: tests/benchmark/test_route_resolution_benchmark.py class TestSanicRouteResolution (line 16) | class TestSanicRouteResolution: method test_resolve_route_no_arg_string_path (line 18) | async def test_resolve_route_no_arg_string_path( method test_resolve_route_with_typed_args (line 48) | async def test_resolve_route_with_typed_args( FILE: tests/certs/createcerts.py function writefiles (line 22) | def writefiles(key, cert): function selfsigned (line 38) | def selfsigned(key, common_name, san): FILE: tests/client.py class RawClient (line 7) | class RawClient: method __init__ (line 10) | def __init__(self, host: str, port: int): method connect (line 16) | async def connect(self): method close (line 21) | async def close(self): method send (line 25) | async def send(self, message: AnyStr): method _send (line 32) | async def _send(self, message: bytes): method recv (line 37) | async def recv(self, nbytes: int = -1) -> bytes: method _clean (line 42) | def _clean(self, message: str) -> str: FILE: tests/conftest.py function get_port (line 37) | def get_port(): function port (line 46) | def port(): function _handler (line 50) | async def _handler(request): class RouteStringGenerator (line 77) | class RouteStringGenerator: method generate_random_direct_route (line 82) | def generate_random_direct_route(self, max_route_depth=4): method add_typed_parameters (line 96) | def add_typed_parameters(self, current_routes, max_route_depth=8): method generate_url_for_template (line 115) | def generate_url_for_template(template): function sanic_router (line 127) | def sanic_router(app): function route_generator (line 151) | def route_generator() -> RouteStringGenerator: function url_param_generator (line 156) | def url_param_generator(): function app (line 161) | def app(request): function run_startup (line 178) | def run_startup(caplog): function run_multi (line 201) | def run_multi(caplog): function message_in_records (line 216) | def message_in_records(): function ext_instance (line 229) | def ext_instance(): function mock_sanic_ext (line 236) | def mock_sanic_ext(ext_instance): # noqa function urlopen (line 247) | def urlopen(): function static_file_directory (line 258) | def static_file_directory(): FILE: tests/fake/server.py function handler (line 17) | async def handler(request): function app_info_dump (line 22) | async def app_info_dump(app: Sanic, _): function app_cleanup (line 33) | async def app_cleanup(app: Sanic, _): function shutdown (line 40) | async def shutdown(app: Sanic, _): function create_app (line 44) | def create_app(): function create_app_with_args (line 48) | def create_app_with_args(args): function foo (line 58) | async def foo(one, two: str, three: str = "..."): function bar (line 63) | def bar(): function baz (line 68) | async def baz(): FILE: tests/http3/test_http_receiver.py function setup (line 31) | async def setup(app: Sanic): function http_request (line 42) | def http_request(app): function generate_protocol (line 46) | def generate_protocol(app): function generate_http_receiver (line 60) | def generate_http_receiver(app, http_request) -> HTTPReceiver: function test_http_receiver_init (line 71) | async def test_http_receiver_init(app: Sanic, http_request: Request): function test_http_receiver_run_request (line 81) | async def test_http_receiver_run_request(app: Sanic, http_request: Reque... function test_http_receiver_run_exception (line 96) | async def test_http_receiver_run_exception(app: Sanic, http_request: Req... function test_http_receiver_respond (line 117) | async def test_http_receiver_respond(app: Sanic, http_request: Request): function test_http_receiver_receive_body (line 134) | async def test_http_receiver_receive_body(app: Sanic, http_request: Requ... function test_http3_events (line 150) | async def test_http3_events(app): function test_send_headers (line 177) | async def test_send_headers(app: Sanic, http_request: Request): function test_multiple_streams (line 216) | async def test_multiple_streams(app): function test_request_stream_id (line 254) | async def test_request_stream_id(app): function test_request_conn_info (line 276) | async def test_request_conn_info(app): function test_request_header_encoding (line 297) | async def test_request_header_encoding(app): function test_request_url_encoding (line 321) | async def test_request_url_encoding(app): FILE: tests/http3/test_server.py function test_server_starts_http3 (line 17) | def test_server_starts_http3(app: Sanic, version, caplog): function test_server_starts_http1_and_http3 (line 43) | def test_server_starts_http1_and_http3(app: Sanic, caplog): function test_server_starts_http1_and_http3_bad_order (line 77) | def test_server_starts_http1_and_http3_bad_order(app: Sanic, caplog): FILE: tests/http3/test_session_ticket_store.py function _generate_ticket (line 8) | def _generate_ticket(label): function test_session_ticket_store (line 22) | def test_session_ticket_store(): FILE: tests/performance/sanic/simple_server.py function test (line 19) | async def test(request): FILE: tests/performance/sanic/varied_server.py function test (line 20) | async def test(request): function test_json_response (line 25) | def test_json_response(request): function rtext (line 30) | def rtext(request, name, butt): function exception (line 35) | def exception(request): function test_server_error (line 40) | async def test_server_error(request): function post_json (line 45) | def post_json(request): function query_string (line 50) | def query_string(request): FILE: tests/skip_test_custom_protocol.py class CustomHttpProtocol (line 5) | class CustomHttpProtocol(HttpProtocol): method write_response (line 6) | def write_response(self, response): function test_use_custom_protocol (line 13) | def test_use_custom_protocol(app): FILE: tests/test_app.py function clear_app_registry (line 27) | def clear_app_registry(): function test_app_loop_running (line 31) | def test_app_loop_running(app: Sanic): function test_create_asyncio_server (line 42) | def test_create_asyncio_server(app: Sanic, port: int): function test_asyncio_server_no_start_serving (line 51) | def test_asyncio_server_no_start_serving(app: Sanic, port): function test_asyncio_server_start_serving (line 63) | def test_asyncio_server_start_serving(app: Sanic, port): function test_create_server_main (line 81) | def test_create_server_main(app: Sanic, caplog, port): function test_create_server_no_startup (line 98) | def test_create_server_no_startup(app: Sanic, port): function test_create_server_main_convenience (line 114) | def test_create_server_main_convenience(app: Sanic, caplog, port): function test_app_loop_not_running (line 130) | def test_app_loop_not_running(app: Sanic): function test_app_run_raise_type_error (line 140) | def test_app_run_raise_type_error(app: Sanic, port): function test_app_route_raise_value_error (line 152) | def test_app_route_raise_value_error(app: Sanic): function test_app_handle_request_handler_is_none (line 165) | def test_app_handle_request_handler_is_none(app: Sanic, monkeypatch): function test_app_enable_websocket (line 190) | def test_app_enable_websocket(app: Sanic, websocket_enabled, enable): function test_app_websocket_parameters (line 204) | def test_app_websocket_parameters(websocket_protocol_mock, app: Sanic): function test_handle_request_with_nested_exception (line 233) | def test_handle_request_with_nested_exception(app: Sanic, monkeypatch): function test_handle_request_with_nested_exception_debug (line 252) | def test_handle_request_with_nested_exception_debug(app: Sanic, monkeypa... function test_handle_request_with_nested_sanic_exception (line 274) | def test_handle_request_with_nested_sanic_exception( function test_app_name_required (line 301) | def test_app_name_required(): function test_app_has_test_mode_sync (line 306) | def test_app_has_test_mode_sync(): function test_app_registry (line 318) | def test_app_registry(): function test_app_registry_wrong_type (line 327) | def test_app_registry_wrong_type(): function test_app_registry_name_reuse (line 334) | def test_app_registry_name_reuse(): function test_app_registry_retrieval (line 345) | def test_app_registry_retrieval(): function test_app_registry_retrieval_from_multiple (line 350) | def test_app_registry_retrieval_from_multiple(): function test_get_app_does_not_exist (line 356) | def test_get_app_does_not_exist(): function test_get_app_does_not_exist_force_create (line 371) | def test_get_app_does_not_exist_force_create(): function test_get_app_default (line 377) | def test_get_app_default(): function test_get_app_no_default (line 382) | def test_get_app_no_default(): function test_get_app_default_ambiguous (line 389) | def test_get_app_default_ambiguous(): function test_app_set_attribute_warning (line 401) | def test_app_set_attribute_warning(app: Sanic): function test_app_set_context (line 410) | def test_app_set_context(app: Sanic): function test_subclass_initialisation (line 417) | def test_subclass_initialisation(): function test_bad_custom_config (line 424) | def test_bad_custom_config(): function test_custom_config (line 435) | def test_custom_config(): function test_custom_context (line 444) | def test_custom_context(): function test_uvloop_config (line 454) | def test_uvloop_config(app: Sanic, monkeypatch, use): function test_uvloop_cannot_never_called_with_create_server (line 480) | def test_uvloop_cannot_never_called_with_create_server(caplog, monkeypat... function test_multiple_uvloop_configs_display_warning (line 518) | def test_multiple_uvloop_configs_display_warning(caplog): function test_cannot_run_fast_and_workers (line 551) | def test_cannot_run_fast_and_workers(app: Sanic, port): function test_no_workers (line 557) | def test_no_workers(app: Sanic, port): function test_cannot_run_single_process_and_workers_or_auto_reload (line 570) | def test_cannot_run_single_process_and_workers_or_auto_reload( function test_default_configure_logging (line 580) | def test_default_configure_logging(): function test_custom_configure_logging (line 587) | def test_custom_configure_logging(): function test_disable_configure_logging (line 594) | def test_disable_configure_logging(): function test_inspector (line 602) | def test_inspector(inspector): function test_build_endpoint_name (line 607) | def test_build_endpoint_name(): function test_manager_in_main_process_only (line 613) | def test_manager_in_main_process_only(app: Sanic): function test_inspector_in_main_process_only (line 630) | def test_inspector_in_main_process_only(app: Sanic): function test_stop_trigger_terminate (line 647) | def test_stop_trigger_terminate(app: Sanic): function test_refresh_pass_passthru_data_to_new_instance (line 668) | def test_refresh_pass_passthru_data_to_new_instance(app: Sanic): FILE: tests/test_asgi.py function message_stack (line 32) | def message_stack(): function receive (line 37) | def receive(message_stack): function send (line 45) | def send(message_stack): function transport (line 53) | def transport(message_stack, receive, send): function protocol (line 58) | def protocol(transport): function test_listeners_triggered (line 65) | def test_listeners_triggered(caplog): function test_listeners_triggered_async (line 166) | def test_listeners_triggered_async(app, caplog): function test_non_default_uvloop_config_raises_warning (line 267) | def test_non_default_uvloop_config_raises_warning(app): function test_mockprotocol_events (line 297) | async def test_mockprotocol_events(protocol): function test_protocol_push_data (line 306) | async def test_protocol_push_data(protocol, message_stack): function test_websocket_send (line 326) | async def test_websocket_send(send, receive, message_stack): function test_websocket_text_receive (line 348) | async def test_websocket_text_receive(send, receive, message_stack): function test_websocket_bytes_receive (line 359) | async def test_websocket_bytes_receive(send, receive, message_stack): function test_websocket_accept_with_no_subprotocols (line 370) | async def test_websocket_accept_with_no_subprotocols( function test_websocket_accept_with_subprotocol (line 385) | async def test_websocket_accept_with_subprotocol(send, receive, message_... function test_websocket_accept_with_multiple_subprotocols (line 400) | async def test_websocket_accept_with_multiple_subprotocols( function test_improper_websocket_connection (line 416) | def test_improper_websocket_connection(transport, send, receive): function test_request_class_regular (line 426) | async def test_request_class_regular(app): function test_request_class_custom (line 436) | async def test_request_class_custom(): function test_cookie_customization (line 451) | async def test_cookie_customization(app): function test_content_type (line 484) | async def test_content_type(app): function test_request_handle_exception (line 508) | async def test_request_handle_exception(app): function test_request_exception_suppressed_by_middleware (line 521) | async def test_request_exception_suppressed_by_middleware(app): function test_signals_triggered (line 538) | async def test_signals_triggered(app): function test_asgi_serve_location (line 571) | async def test_asgi_serve_location(app): function test_error_on_lifespan_exception_start (line 581) | async def test_error_on_lifespan_exception_start(app, caplog): function test_error_on_lifespan_exception_stop (line 612) | async def test_error_on_lifespan_exception_stop(app: Sanic): function test_asgi_headers_decoding (line 643) | async def test_asgi_headers_decoding(app: Sanic, monkeypatch: MonkeyPatch): function test_asgi_url_decoding (line 666) | async def test_asgi_url_decoding(app): FILE: tests/test_bad_request.py function test_bad_request_response (line 6) | def test_bad_request_response(app: Sanic): FILE: tests/test_base.py function app (line 8) | def app(): function bp (line 13) | def bp(app): function test_app_str (line 17) | def test_app_str(app): function test_app_repr (line 21) | def test_app_repr(app): function test_bp_str (line 25) | def test_bp_str(bp): function test_bp_repr (line 29) | def test_bp_repr(bp): function test_bp_repr_with_values (line 36) | def test_bp_repr_with_values(bp): function test_names_okay (line 65) | def test_names_okay(name): function test_names_not_okay (line 81) | def test_names_not_okay(name): FILE: tests/test_blueprint_copy.py function test_bp_copy (line 9) | def test_bp_copy(app: Sanic): function test_bp_copy_without_route_overwriting (line 83) | def test_bp_copy_without_route_overwriting(app: Sanic): function test_bp_copy_with_route_overwriting (line 117) | def test_bp_copy_with_route_overwriting(app: Sanic): FILE: tests/test_blueprint_group.py function test_bp_group_indexing (line 18) | def test_bp_group_indexing(app: Sanic): function test_bp_group_set_item_by_index (line 29) | def test_bp_group_set_item_by_index(app: Sanic): function test_bp_group_with_additional_route_params (line 39) | def test_bp_group_with_additional_route_params(app: Sanic): function test_bp_group (line 104) | def test_bp_group(app: Sanic): function test_bp_group_list_operations (line 216) | def test_bp_group_list_operations(app: Sanic): function test_bp_group_as_list (line 252) | def test_bp_group_as_list(): function test_bp_group_as_nested_group (line 259) | def test_bp_group_as_nested_group(): function test_blueprint_group_insert (line 268) | def test_blueprint_group_insert(): function test_bp_group_properties (line 305) | def test_bp_group_properties(): function test_nested_bp_group_properties (line 340) | def test_nested_bp_group_properties(): function test_multiple_nested_bp_group (line 358) | async def test_multiple_nested_bp_group(): FILE: tests/test_blueprints.py function test_bp (line 20) | def test_bp(app: Sanic): function test_bp_app_access (line 33) | def test_bp_app_access(app: Sanic): function static_file_directory (line 48) | def static_file_directory(): function get_file_path (line 56) | def get_file_path(static_file_directory, file_name): function get_file_content (line 60) | def get_file_content(static_file_directory, file_name): function test_versioned_routes_get (line 67) | def test_versioned_routes_get(app, method): function test_bp_strict_slash (line 90) | def test_bp_strict_slash(app: Sanic): function test_bp_strict_slash_default_value (line 117) | def test_bp_strict_slash_default_value(app: Sanic): function test_bp_strict_slash_without_passing_default_value (line 137) | def test_bp_strict_slash_without_passing_default_value(app: Sanic): function test_bp_strict_slash_default_value_can_be_overwritten (line 157) | def test_bp_strict_slash_default_value_can_be_overwritten(app: Sanic): function test_bp_with_url_prefix (line 177) | def test_bp_with_url_prefix(app: Sanic): function test_several_bp_with_url_prefix (line 190) | def test_several_bp_with_url_prefix(app: Sanic): function test_bp_with_host (line 211) | def test_bp_with_host(app: Sanic): function test_several_bp_with_host (line 233) | def test_several_bp_with_host(app: Sanic): function test_bp_with_host_list (line 277) | def test_bp_with_host_list(app: Sanic): function test_several_bp_with_host_list (line 311) | def test_several_bp_with_host_list(app: Sanic): function test_bp_middleware (line 363) | def test_bp_middleware(app: Sanic): function test_bp_middleware_with_route (line 382) | def test_bp_middleware_with_route(app: Sanic): function test_bp_middleware_order (line 405) | def test_bp_middleware_order(app: Sanic): function test_bp_exception_handler (line 445) | def test_bp_exception_handler(app: Sanic): function test_bp_exception_handler_applied (line 477) | def test_bp_exception_handler_applied(app: Sanic): function test_bp_exception_handler_not_applied (line 507) | def test_bp_exception_handler_not_applied(app: Sanic): function test_bp_listeners (line 529) | def test_bp_listeners(app: Sanic): function test_bp_static (line 566) | def test_bp_static(app: Sanic): function test_bp_static_content_type (line 583) | def test_bp_static_content_type(app, file_name): function test_bp_shorthand (line 604) | def test_bp_shorthand(app: Sanic): function test_bp_group (line 689) | def test_bp_group(app: Sanic): function test_bp_group_with_default_url_prefix (line 729) | def test_bp_group_with_default_url_prefix(app: Sanic): function test_blueprint_middleware_with_args (line 774) | def test_blueprint_middleware_with_args(app: Sanic): function test_static_blueprint_name (line 805) | def test_static_blueprint_name(static_file_directory, file_name): function test_static_blueprintp_mw (line 833) | def test_static_blueprintp_mw(app: Sanic, static_file_directory, file_na... function test_websocket_route (line 863) | def test_websocket_route(app: Sanic): function test_duplicate_blueprint (line 880) | def test_duplicate_blueprint(app: Sanic): function test_strict_slashes_behavior_adoption (line 896) | def test_strict_slashes_behavior_adoption(): function test_blueprint_group_versioning (line 941) | def test_blueprint_group_versioning(): function test_blueprint_group_strict_slashes (line 985) | def test_blueprint_group_strict_slashes(): function test_blueprint_registered_multiple_apps (line 1036) | def test_blueprint_registered_multiple_apps(): function test_bp_set_attribute_warning (line 1053) | def test_bp_set_attribute_warning(): function test_early_registration (line 1063) | def test_early_registration(app: Sanic): function test_remove_double_slashes_defined_on_bp (line 1091) | def test_remove_double_slashes_defined_on_bp(app: Sanic): function test_remove_double_slashes_defined_on_register (line 1103) | def test_remove_double_slashes_defined_on_register(app: Sanic): function test_blueprint_copy_returns_blueprint_with_the_name_of_original_blueprint (line 1115) | def test_blueprint_copy_returns_blueprint_with_the_name_of_original_blue... function test_blueprint_copy_returns_blueprint_with_overwritten_properties (line 1128) | def test_blueprint_copy_returns_blueprint_with_overwritten_properties( FILE: tests/test_cancellederror.py function test_can_raise_in_handler (line 6) | def test_can_raise_in_handler(app: Sanic): FILE: tests/test_cli.py function tty (line 22) | def tty(): function capture (line 29) | def capture(command: list[str], caplog=None, capsys=None): function read_app_info (line 47) | def read_app_info(lines: list[str]): function test_server_run (line 63) | def test_server_run( function test_server_run_factory_with_args (line 81) | def test_server_run_factory_with_args(caplog, command, port): function test_server_run_factory_with_args_arbitrary (line 88) | def test_server_run_factory_with_args_arbitrary(caplog, port): function test_tls_options (line 118) | def test_tls_options(cmd: tuple[str, ...], caplog, port): function test_tls_wrong_options (line 142) | def test_tls_wrong_options(cmd: tuple[str, ...], caplog, port): function test_host_port_localhost (line 160) | def test_host_port_localhost(cmd: tuple[str, ...], caplog, port): function test_host_port (line 194) | def test_host_port(cmd: tuple[str, ...], expected: str, caplog, port): function test_num_workers (line 214) | def test_num_workers(num: int, cmd: tuple[str, ...], caplog, port): function test_debug (line 227) | def test_debug(cmd: str, caplog, port): function test_dev (line 237) | def test_dev(cmd: str, caplog, port): function test_auto_reload (line 247) | def test_auto_reload(cmd: str, caplog, port): function test_access_logs (line 267) | def test_access_logs(cmd: str, expected: bool, caplog, port): function test_version (line 282) | def test_version(cmd: str, caplog, capsys): function test_noisy_exceptions (line 297) | def test_noisy_exceptions(cmd: str, expected: bool, caplog, port): function test_inspector_inspect (line 305) | def test_inspector_inspect(urlopen, caplog, capsys): function test_inspector_command (line 344) | def test_inspector_command(command, params): function test_server_run_with_repl (line 352) | def test_server_run_with_repl(caplog, capsys): function test_command_no_args (line 375) | def test_command_no_args(caplog): function test_command_with_args (line 382) | def test_command_with_args(caplog): function test_command_with_sync_handler (line 396) | def test_command_with_sync_handler(caplog): function test_command_with_renamed_command (line 403) | def test_command_with_renamed_command(caplog): function test_add_local_method (line 410) | def test_add_local_method(app): function test_add_local_attr (line 432) | def test_add_local_attr(app): FILE: tests/test_coffee.py function has_sugar (line 11) | def has_sugar(value): function test_no_sugar (line 19) | def test_no_sugar(sugar): function test_get_logo_returns_expected_logo (line 27) | def test_get_logo_returns_expected_logo(): function test_logo_true (line 34) | def test_logo_true(app, caplog): FILE: tests/test_config.py function temp_path (line 24) | def temp_path(): class ConfigTest (line 30) | class ConfigTest: method ANOTHER_VALUE (line 35) | def ANOTHER_VALUE(self): method another_not_for_config (line 39) | def another_not_for_config(self): class UltimateAnswer (line 43) | class UltimateAnswer: method __init__ (line 44) | def __init__(self, answer): function test_load_from_object (line 48) | def test_load_from_object(app: Sanic): function test_load_from_object_string (line 55) | def test_load_from_object_string(app: Sanic): function test_load_from_instance (line 62) | def test_load_from_instance(app: Sanic): function test_load_from_object_string_exception (line 71) | def test_load_from_object_string_exception(app: Sanic): function test_auto_env_prefix (line 76) | def test_auto_env_prefix(): function test_auto_bool_env_prefix (line 83) | def test_auto_bool_env_prefix(): function test_empty_load_env_prefix (line 91) | def test_empty_load_env_prefix(env_prefix): function test_env_prefix (line 98) | def test_env_prefix(): function test_env_prefix_float_values (line 105) | def test_env_prefix_float_values(): function test_env_prefix_string_value (line 112) | def test_env_prefix_string_value(): function test_env_w_custom_converter (line 119) | def test_env_w_custom_converter(): function test_env_lowercase (line 129) | def test_env_lowercase(): function test_add_converter_multiple_times (line 136) | def test_add_converter_multiple_times(caplog): class MockDetailedConverter (line 151) | class MockDetailedConverter(DetailedConverter): method __call__ (line 154) | def __call__( function test_detailed_converter_basic_functionality (line 166) | def test_detailed_converter_basic_functionality(): function test_detailed_converter_with_defaults (line 183) | def test_detailed_converter_with_defaults(): function test_detailed_converter_with_custom_prefix (line 201) | def test_detailed_converter_with_custom_prefix(): function test_load_from_file (line 216) | def test_load_from_file(app: Sanic): function test_load_from_missing_file (line 235) | def test_load_from_missing_file(app: Sanic): function test_load_from_envvar (line 240) | def test_load_from_envvar(app: Sanic): function test_load_from_missing_envvar (line 250) | def test_load_from_missing_envvar(app: Sanic): function test_load_config_from_file_invalid_syntax (line 260) | def test_load_config_from_file_invalid_syntax(app: Sanic): function test_overwrite_exisiting_config (line 269) | def test_overwrite_exisiting_config(app: Sanic): function test_overwrite_exisiting_config_ignore_lowercase (line 279) | def test_overwrite_exisiting_config_ignore_lowercase(app: Sanic): function test_missing_config (line 289) | def test_missing_config(app: Sanic): function test_config_defaults (line 294) | def test_config_defaults(): function test_config_custom_defaults (line 303) | def test_config_custom_defaults(): function test_config_custom_defaults_with_env (line 321) | def test_config_custom_defaults_with_env(): function test_config_access_log_passing_in_run (line 358) | def test_config_access_log_passing_in_run(app: Sanic, port, access_log): function test_config_access_log_passing_in_create_server (line 370) | async def test_config_access_log_passing_in_create_server(app: Sanic): function test_config_rewrite_keep_alive (line 388) | def test_config_rewrite_keep_alive(): function test_update (line 419) | def test_update(app: Sanic, conf_object): function test_update_from_lowercase_key (line 424) | def test_update_from_lowercase_key(app: Sanic): function test_config_set_methods (line 430) | def test_config_set_methods(app: Sanic, monkeypatch: MonkeyPatch): function test_negative_proxy_count (line 477) | def test_negative_proxy_count(app: Sanic): function test_convert_local_cert_creator (line 500) | def test_convert_local_cert_creator(passed, expected): FILE: tests/test_constants.py function test_string_compat (line 9) | def test_string_compat(enum): function test_http_methods (line 15) | def test_http_methods(): function test_server_stage (line 20) | def test_server_stage(): function test_use_in_routes (line 24) | def test_use_in_routes(app: Sanic): FILE: tests/test_cookies.py function test_request_cookies (line 16) | def test_request_cookies(): function test_cookies (line 35) | def test_cookies(app): function test_cookies_asgi (line 52) | async def test_cookies_asgi(app): function test_false_cookies_encoded (line 73) | def test_false_cookies_encoded(app, httponly, expected): function test_false_cookies (line 86) | def test_false_cookies(app, httponly, expected): function test_http2_cookies (line 100) | def test_http2_cookies(app): function test_cookie_options (line 113) | def test_cookie_options(app): function test_cookie_deletion (line 133) | def test_cookie_deletion(app): function test_cookie_reserved_cookie (line 153) | def test_cookie_reserved_cookie(): function test_cookie_illegal_key_format (line 159) | def test_cookie_illegal_key_format(): function test_cookie_set_same_key (line 165) | def test_cookie_set_same_key(app): function test_cookie_max_age (line 181) | def test_cookie_max_age(app, max_age): function test_cookie_bad_max_age (line 222) | def test_cookie_bad_max_age(app, max_age): function test_cookie_expires (line 238) | def test_cookie_expires(app: Sanic, expires: timedelta): function test_cookie_expires_illegal_instance_type (line 262) | def test_cookie_expires_illegal_instance_type(expires): function test_request_with_duplicate_cookie_key (line 270) | def test_request_with_duplicate_cookie_key(value): function test_cookie_jar_cookies (line 280) | def test_cookie_jar_cookies(): function test_cookie_jar_has_cookie (line 290) | def test_cookie_jar_has_cookie(): function test_cookie_jar_get_cookie (line 302) | def test_cookie_jar_get_cookie(): function test_cookie_jar_add_cookie_encode (line 314) | def test_cookie_jar_add_cookie_encode(): function test_cookie_jar_old_school_cookie_encode (line 342) | def test_cookie_jar_old_school_cookie_encode(): function test_cookie_jar_delete_cookie_encode (line 363) | def test_cookie_jar_delete_cookie_encode(): function test_cookie_jar_delete_nonsecure_cookie (line 376) | def test_cookie_jar_delete_nonsecure_cookie(): function test_cookie_jar_delete_existing_cookie (line 387) | def test_cookie_jar_delete_existing_cookie(): function test_cookie_jar_delete_existing_nonsecure_cookie (line 403) | def test_cookie_jar_delete_existing_nonsecure_cookie(): function test_cookie_jar_delete_existing_nonsecure_cookie_bad_prefix (line 418) | def test_cookie_jar_delete_existing_nonsecure_cookie_bad_prefix(): function test_cookie_jar_old_school_delete_encode (line 438) | def test_cookie_jar_old_school_delete_encode(): function test_bad_cookie_prarms (line 449) | def test_bad_cookie_prarms(): function test_cookie_accessors (line 500) | def test_cookie_accessors(app: Sanic): function test_cookie_accessor_hyphens (line 569) | def test_cookie_accessor_hyphens(): function test_cookie_passthru (line 575) | def test_cookie_passthru(app): FILE: tests/test_create_task.py function test_create_task (line 11) | def test_create_task(app): function test_create_task_with_app_arg (line 38) | def test_create_task_with_app_arg(app): function test_create_named_task (line 56) | def test_create_named_task(app, port): function test_named_task_called (line 77) | def test_named_task_called(app): function test_create_named_task_fails_outside_app (line 96) | def test_create_named_task_fails_outside_app(app): FILE: tests/test_custom_request.py class CustomRequest (line 8) | class CustomRequest(Request): method receive_body (line 11) | async def receive_body(self): function test_custom_request (line 19) | def test_custom_request(): FILE: tests/test_daemon.py function temp_pidfile (line 32) | def temp_pidfile(tmp_path): function temp_logfile (line 38) | def temp_logfile(tmp_path): function temp_lockfile (line 44) | def temp_lockfile(tmp_path): function test_get_default_runtime_dir_uses_xdg (line 52) | def test_get_default_runtime_dir_uses_xdg(tmp_path): function test_get_default_runtime_dir_falls_back_to_state_dir (line 63) | def test_get_default_runtime_dir_falls_back_to_state_dir(tmp_path): function test_get_default_runtime_dir_xdg_mkdir_oserror (line 75) | def test_get_default_runtime_dir_xdg_mkdir_oserror(tmp_path): function test_get_default_runtime_dir_falls_back_to_cache_dir (line 92) | def test_get_default_runtime_dir_falls_back_to_cache_dir(tmp_path): function test_get_default_runtime_dir_falls_back_to_cwd (line 115) | def test_get_default_runtime_dir_falls_back_to_cwd(tmp_path, monkeypatch): function test_sanitize_name_alphanumeric (line 131) | def test_sanitize_name_alphanumeric(): function test_sanitize_name_allowed_special_chars (line 136) | def test_sanitize_name_allowed_special_chars(): function test_sanitize_name_replaces_invalid_chars (line 142) | def test_sanitize_name_replaces_invalid_chars(): function test_sanitize_name_strips_dots_underscores (line 148) | def test_sanitize_name_strips_dots_underscores(): function test_sanitize_name_empty_returns_sanic (line 154) | def test_sanitize_name_empty_returns_sanic(): function test_process_exists_returns_true_for_current (line 163) | def test_process_exists_returns_true_for_current(): function test_process_exists_returns_false_for_nonexistent (line 167) | def test_process_exists_returns_false_for_nonexistent(): function test_process_exists_returns_false_on_oserror (line 171) | def test_process_exists_returns_false_on_oserror(): function test_is_sanic_process_returns_false_on_oserror (line 179) | def test_is_sanic_process_returns_false_on_oserror(): function test_is_sanic_process_returns_true_when_proc_unavailable (line 190) | def test_is_sanic_process_returns_true_when_proc_unavailable(): function test_is_sanic_process_returns_true_when_sanic_found (line 200) | def test_is_sanic_process_returns_true_when_sanic_found(): function test_is_sanic_process_returns_false_when_not_sanic (line 211) | def test_is_sanic_process_returns_false_when_not_sanic(): function test_pidfile_info_all_fields (line 225) | def test_pidfile_info_all_fields(): function test_pidfile_info_defaults (line 232) | def test_pidfile_info_defaults(): function test_pidfile_info_frozen (line 239) | def test_pidfile_info_frozen(): function test_daemon_init_with_explicit_pidfile (line 248) | def test_daemon_init_with_explicit_pidfile(tmp_path): function test_daemon_init_with_auto_pidfile_and_name (line 254) | def test_daemon_init_with_auto_pidfile_and_name(): function test_daemon_init_with_empty_pidfile_string (line 260) | def test_daemon_init_with_empty_pidfile_string(): function test_daemon_init_with_auto_pidfile_no_name (line 266) | def test_daemon_init_with_auto_pidfile_no_name(): function test_daemon_init_with_explicit_lockfile (line 274) | def test_daemon_init_with_explicit_lockfile(tmp_path): function test_daemon_init_no_pidfile (line 280) | def test_daemon_init_no_pidfile(): function test_daemon_init_with_logfile (line 285) | def test_daemon_init_with_logfile(tmp_path): function test_daemon_init_with_user_and_group (line 291) | def test_daemon_init_with_user_and_group(): function test_validates_nonexistent_user (line 300) | def test_validates_nonexistent_user(temp_pidfile): function test_validates_nonexistent_group (line 307) | def test_validates_nonexistent_group(temp_pidfile): function test_validates_pidfile_directory (line 314) | def test_validates_pidfile_directory(): function test_validates_logfile_directory (line 321) | def test_validates_logfile_directory(): function test_validates_lockfile_directory (line 328) | def test_validates_lockfile_directory(): function test_detects_already_running (line 335) | def test_detects_already_running(temp_pidfile): function test_ignores_stale_pidfile (line 345) | def test_ignores_stale_pidfile(temp_pidfile): function test_validates_without_pidfile (line 352) | def test_validates_without_pidfile(temp_logfile): function test_validate_writable_dir_not_writable (line 357) | def test_validate_writable_dir_not_writable(tmp_path): function test_validate_user_sets_uid_and_gid (line 370) | def test_validate_user_sets_uid_and_gid(temp_pidfile): function test_validate_group_sets_gid (line 377) | def test_validate_group_sets_gid(temp_pidfile): function test_validate_creates_default_lockfile (line 383) | def test_validate_creates_default_lockfile(temp_pidfile): function test_writes_pidfile_with_marker (line 392) | def test_writes_pidfile_with_marker(temp_pidfile): function test_writes_pidfile_with_name (line 405) | def test_writes_pidfile_with_name(temp_pidfile): function test_writes_pidfile_with_started_timestamp (line 413) | def test_writes_pidfile_with_started_timestamp(temp_pidfile): function test_write_pidfile_oserror (line 421) | def test_write_pidfile_oserror(temp_pidfile): function test_write_pidfile_skips_if_no_pidfile (line 429) | def test_write_pidfile_skips_if_no_pidfile(): function test_reads_pidfile_with_marker (line 434) | def test_reads_pidfile_with_marker(temp_pidfile): function test_rejects_pidfile_without_marker (line 441) | def test_rejects_pidfile_without_marker(temp_pidfile): function test_no_pidfile_when_not_requested (line 448) | def test_no_pidfile_when_not_requested(): function test_name_pidfile_generation (line 453) | def test_name_pidfile_generation(): function test_get_pidfile_path (line 459) | def test_get_pidfile_path(): function test_removes_pidfile_on_cleanup (line 464) | def test_removes_pidfile_on_cleanup(temp_pidfile): function test_remove_pidfile_handles_missing_file (line 473) | def test_remove_pidfile_handles_missing_file(temp_pidfile): function test_remove_pidfile_handles_oserror (line 478) | def test_remove_pidfile_handles_oserror(temp_pidfile): function test_remove_pidfile_skips_if_no_pidfile (line 489) | def test_remove_pidfile_skips_if_no_pidfile(): function test_read_pidfile_info_returns_none_for_missing (line 497) | def test_read_pidfile_info_returns_none_for_missing(): function test_read_pidfile_info_returns_none_on_read_error (line 502) | def test_read_pidfile_info_returns_none_on_read_error(temp_pidfile): function test_read_pidfile_info_returns_none_for_empty_file (line 510) | def test_read_pidfile_info_returns_none_for_empty_file(temp_pidfile): function test_read_pidfile_info_returns_none_without_sanic_marker (line 516) | def test_read_pidfile_info_returns_none_without_sanic_marker(temp_pidfile): function test_read_pidfile_info_returns_none_for_invalid_pid (line 522) | def test_read_pidfile_info_returns_none_for_invalid_pid(temp_pidfile): function test_read_pidfile_info_returns_none_for_missing_pid (line 528) | def test_read_pidfile_info_returns_none_for_missing_pid(temp_pidfile): function test_read_pidfile_info_handles_invalid_started (line 534) | def test_read_pidfile_info_handles_invalid_started(temp_pidfile): function test_read_pidfile_info_parses_all_fields (line 542) | def test_read_pidfile_info_parses_all_fields(temp_pidfile): function test_read_pidfile_info_handles_empty_name (line 553) | def test_read_pidfile_info_handles_empty_name(temp_pidfile): function test_acquire_lockfile_success (line 563) | def test_acquire_lockfile_success(temp_lockfile): function test_acquire_lockfile_skips_if_no_lockfile (line 574) | def test_acquire_lockfile_skips_if_no_lockfile(): function test_acquire_lockfile_fails_when_locked (line 581) | def test_acquire_lockfile_fails_when_locked(temp_lockfile): function test_acquire_lockfile_oserror_on_open (line 597) | def test_acquire_lockfile_oserror_on_open(tmp_path): function test_release_lockfile_skips_if_no_fd (line 605) | def test_release_lockfile_skips_if_no_fd(): function test_release_lockfile_handles_unlock_oserror (line 611) | def test_release_lockfile_handles_unlock_oserror(temp_lockfile): function test_release_lockfile_handles_close_oserror (line 622) | def test_release_lockfile_handles_close_oserror(temp_lockfile): function test_release_lockfile_handles_unlink_oserror (line 631) | def test_release_lockfile_handles_unlink_oserror(temp_lockfile): function test_release_lockfile_cleans_up (line 640) | def test_release_lockfile_cleans_up(temp_lockfile): function test_redirect_streams_to_devnull (line 653) | def test_redirect_streams_to_devnull(tmp_path, temp_pidfile): function test_redirect_streams_to_logfile (line 681) | def test_redirect_streams_to_logfile(temp_pidfile, temp_logfile): function test_setup_signal_handlers_skips_if_no_pidfile (line 712) | def test_setup_signal_handlers_skips_if_no_pidfile(): function test_setup_signal_handlers_installs_sighup (line 717) | def test_setup_signal_handlers_installs_sighup(temp_pidfile): function test_sighup_handler_rewrites_pidfile (line 731) | def test_sighup_handler_rewrites_pidfile(temp_pidfile): function test_sighup_handler_calls_original_handler (line 751) | def test_sighup_handler_calls_original_handler(temp_pidfile): function test_daemonize_forks_twice (line 784) | def test_daemonize_forks_twice(temp_pidfile, temp_logfile): function test_daemonize_calls_validate (line 808) | def test_daemonize_calls_validate(temp_pidfile): function test_daemonize_first_fork_error (line 826) | def test_daemonize_first_fork_error(temp_pidfile): function test_daemonize_second_fork_error (line 835) | def test_daemonize_second_fork_error(temp_pidfile): function test_daemonize_acquires_lockfile (line 857) | def test_daemonize_acquires_lockfile(temp_pidfile, temp_lockfile): function test_drop_privileges_does_nothing_without_user_group (line 881) | def test_drop_privileges_does_nothing_without_user_group(): function test_drop_privileges_warns_if_not_root (line 886) | def test_drop_privileges_warns_if_not_root(temp_pidfile): function test_drop_privileges_requires_root (line 896) | def test_drop_privileges_requires_root(temp_pidfile): function test_drop_privileges_setuid_error (line 907) | def test_drop_privileges_setuid_error(temp_pidfile): function test_drop_privileges_sets_gid_and_initgroups (line 918) | def test_drop_privileges_sets_gid_and_initgroups(temp_pidfile): function test_drop_privileges_skips_initgroups_without_user (line 934) | def test_drop_privileges_skips_initgroups_without_user(temp_pidfile): function test_raises_on_windows (line 952) | def test_raises_on_windows(): function test_daemon_flag_parsed (line 964) | def test_daemon_flag_parsed(): function test_pidfile_without_daemon_fails (line 975) | def test_pidfile_without_daemon_fails(): function test_logfile_without_daemon_fails (line 987) | def test_logfile_without_daemon_fails(): function test_daemon_with_dev_is_incompatible (line 999) | def test_daemon_with_dev_is_incompatible(): function test_daemon_with_auto_reload_is_incompatible (line 1009) | def test_daemon_with_auto_reload_is_incompatible(): function test_daemon_with_repl_is_incompatible (line 1019) | def test_daemon_with_repl_is_incompatible(): function test_user_group_options_parsed (line 1029) | def test_user_group_options_parsed(): function test_kill_command_parses_pid (line 1043) | def test_kill_command_parses_pid(): function test_kill_command_parses_pidfile (line 1053) | def test_kill_command_parses_pidfile(): function test_kill_command_requires_target (line 1065) | def test_kill_command_requires_target(): function test_kill_always_sends_sigkill (line 1073) | def test_kill_always_sends_sigkill(temp_pidfile): function test_kill_removes_pidfile_after_success (line 1086) | def test_kill_removes_pidfile_after_success(temp_pidfile): function test_kill_handles_missing_pidfile (line 1099) | def test_kill_handles_missing_pidfile(tmp_path): function test_kill_handles_process_not_found (line 1111) | def test_kill_handles_process_not_found(): function test_kill_direct_pid (line 1119) | def test_kill_direct_pid(): function test_kill_invalid_pidfile_fails (line 1128) | def test_kill_invalid_pidfile_fails(temp_pidfile): function test_status_command_parses_pid (line 1141) | def test_status_command_parses_pid(): function test_status_command_parses_pidfile (line 1151) | def test_status_command_parses_pidfile(): function test_status_command_requires_target (line 1163) | def test_status_command_requires_target(): function test_status_running_process (line 1171) | def test_status_running_process(temp_pidfile): function test_status_not_running_process (line 1184) | def test_status_not_running_process(temp_pidfile): function test_status_direct_pid_running (line 1197) | def test_status_direct_pid_running(): function test_status_direct_pid_not_running (line 1206) | def test_status_direct_pid_not_running(): function test_restart_command_parses_pid (line 1217) | def test_restart_command_parses_pid(): function test_restart_command_parses_pidfile (line 1227) | def test_restart_command_parses_pidfile(): function test_restart_command_requires_target (line 1239) | def test_restart_command_requires_target(): function test_restart_not_implemented (line 1247) | def test_restart_not_implemented(temp_pidfile, capsys): FILE: tests/test_deprecation.py function test_deprecation (line 7) | def test_deprecation(): function test_deprecation_filter (line 17) | def test_deprecation_filter(app: Sanic, filter, expected, recwarn): FILE: tests/test_dynamic_routes.py function test_overload_dynamic_routes (line 16) | def test_overload_dynamic_routes(app, method, attr, expected): function test_overload_dynamic_routes_exist (line 29) | def test_overload_dynamic_routes_exist(app): FILE: tests/test_errorpages.py function app (line 17) | def app(): function fake_request (line 66) | def fake_request(app): function test_should_return_html_valid_setting (line 85) | def test_should_return_html_valid_setting( function test_auto_fallback_with_data (line 111) | def test_auto_fallback_with_data(app): function test_auto_fallback_with_content_type (line 127) | def test_auto_fallback_with_content_type(app): function test_route_error_format_set_on_auto (line 143) | def test_route_error_format_set_on_auto(app): function test_route_error_response_from_auto_route (line 166) | def test_route_error_response_from_auto_route(app): function test_route_error_response_from_explicit_format (line 192) | def test_route_error_response_from_explicit_format(app): function test_blueprint_error_response_from_explicit_format (line 210) | def test_blueprint_error_response_from_explicit_format(app): function test_unknown_fallback_format (line 231) | def test_unknown_fallback_format(app): function test_route_error_format_unknown (line 236) | def test_route_error_format_unknown(app): function test_fallback_with_content_type_html (line 243) | def test_fallback_with_content_type_html(app): function test_fallback_with_content_type_mismatch_accept (line 254) | def test_fallback_with_content_type_mismatch_accept(app): function test_combinations_for_auto (line 340) | def test_combinations_for_auto(fake_request, accept, content_type, expec... function test_allow_fallback_error_format_set_main_process_start (line 363) | def test_allow_fallback_error_format_set_main_process_start(app): function test_setting_fallback_on_config_changes_as_expected (line 373) | def test_setting_fallback_on_config_changes_as_expected(app): function test_allow_fallback_error_format_in_config_injection (line 388) | def test_allow_fallback_error_format_in_config_injection(): function test_allow_fallback_error_format_in_config_replacement (line 403) | def test_allow_fallback_error_format_in_config_replacement(app): function test_config_fallback_before_and_after_startup (line 414) | def test_config_fallback_before_and_after_startup(app): function test_config_fallback_using_update_dict (line 426) | def test_config_fallback_using_update_dict(app): function test_config_fallback_using_update_kwarg (line 434) | def test_config_fallback_using_update_kwarg(app): function test_config_fallback_bad_value (line 442) | def test_config_fallback_bad_value(app): function test_guess_mime_logging (line 523) | def test_guess_mime_logging( function test_exception_header_on_renderers (line 563) | def test_exception_header_on_renderers(app: Sanic, format, expected): FILE: tests/test_exceptions.py function dl_to_dict (line 28) | def dl_to_dict(soup, dl_id): class SanicExceptionTestException (line 38) | class SanicExceptionTestException(Exception): function exception_app (line 43) | def exception_app(): function test_catch_exception_list (line 118) | def test_catch_exception_list(app): function test_no_exception (line 134) | def test_no_exception(exception_app): function test_server_error_exception (line 141) | def test_server_error_exception(exception_app): function test_invalid_usage_exception (line 147) | def test_invalid_usage_exception(exception_app): function test_not_found_exception (line 153) | def test_not_found_exception(exception_app): function test_forbidden_exception (line 159) | def test_forbidden_exception(exception_app): function test_unauthorized_exception (line 165) | def test_unauthorized_exception(exception_app): function test_handled_unhandled_exception (line 191) | def test_handled_unhandled_exception(exception_app): function test_exception_in_exception_handler (line 202) | def test_exception_in_exception_handler(exception_app): function test_exception_in_exception_handler_debug_off (line 211) | def test_exception_in_exception_handler_debug_off(exception_app): function test_exception_in_exception_handler_debug_on (line 220) | def test_exception_in_exception_handler_debug_on(exception_app): function test_sanic_exception (line 229) | def test_sanic_exception(exception_app): function test_custom_exception_default_message (line 244) | def test_custom_exception_default_message(exception_app): function test_exception_in_ws_logged (line 260) | def test_exception_in_ws_logged(caplog): function test_contextual_exception_context (line 280) | def test_contextual_exception_context(debug): function test_contextual_exception_extra (line 321) | def test_contextual_exception_extra(debug): function test_contextual_exception_functional_message (line 374) | def test_contextual_exception_functional_message(override): function test_exception_aliases (line 398) | def test_exception_aliases(): function test_exception_message_attribute (line 405) | def test_exception_message_attribute(): function test_exception_quiet_attribute (line 420) | def test_exception_quiet_attribute(): function test_request_middleware_exception_on_404 (line 435) | def test_request_middleware_exception_on_404(app: Sanic): FILE: tests/test_exceptions_handler.py class ErrorWithRequestCtx (line 19) | class ErrorWithRequestCtx(ServerError): function exception_handler_app (line 24) | def exception_handler_app(): function test_invalid_usage_exception_handler (line 89) | def test_invalid_usage_exception_handler(exception_handler_app: Sanic): function test_server_error_exception_handler (line 94) | def test_server_error_exception_handler(exception_handler_app: Sanic): function test_not_found_exception_handler (line 100) | def test_not_found_exception_handler(exception_handler_app: Sanic): function test_text_exception__handler (line 105) | def test_text_exception__handler(exception_handler_app: Sanic): function test_async_exception_handler (line 111) | def test_async_exception_handler(exception_handler_app: Sanic): function test_html_traceback_output_in_debug_mode (line 117) | def test_html_traceback_output_in_debug_mode(exception_handler_app: Sanic): function test_inherited_exception_handler (line 133) | def test_inherited_exception_handler(exception_handler_app: Sanic): function test_chained_exception_handler (line 138) | def test_chained_exception_handler(exception_handler_app: Sanic): function test_exception_handler_lookup (line 159) | def test_exception_handler_lookup(exception_handler_app: Sanic): function test_exception_handler_processed_request_middleware (line 207) | def test_exception_handler_processed_request_middleware( function test_error_handler_noisy_log (line 215) | def test_error_handler_noisy_log( function test_exception_handler_response_was_sent (line 232) | def test_exception_handler_response_was_sent( function test_errir_on_duplicate (line 273) | def test_errir_on_duplicate(app: Sanic): FILE: tests/test_ext_integration.py function stoppable_app (line 17) | def stoppable_app(app): function test_ext_is_loaded (line 25) | def test_ext_is_loaded(stoppable_app: Sanic, mock_sanic_ext, port): function test_ext_is_not_loaded (line 30) | def test_ext_is_not_loaded(stoppable_app: Sanic, mock_sanic_ext, port): function test_extend_with_args (line 36) | def test_extend_with_args(stoppable_app: Sanic, mock_sanic_ext, port): function test_access_object_sets_up_extension (line 44) | def test_access_object_sets_up_extension(app: Sanic, mock_sanic_ext): function test_extend_cannot_be_called_multiple_times (line 49) | def test_extend_cannot_be_called_multiple_times(app: Sanic, mock_sanic_e... function test_fail_if_not_loaded (line 64) | def test_fail_if_not_loaded(app: Sanic): function test_can_access_app_ext_while_running (line 72) | def test_can_access_app_ext_while_running( FILE: tests/test_graceful_shutdown.py function test_no_exceptions_when_cancel_pending_request (line 12) | def test_no_exceptions_when_cancel_pending_request( function test_completes_request (line 34) | def test_completes_request(app, caplog: LogCaptureFixture, port): FILE: tests/test_handler.py function test_handler_operation_order (line 6) | def test_handler_operation_order(app: Sanic): FILE: tests/test_handler_annotations.py function test_annotated_handlers (line 17) | def test_annotated_handlers(app, idx, path, expectation): FILE: tests/test_headers.py function make_request (line 11) | def make_request(headers) -> Request: function raised_ceiling (line 16) | def raised_ceiling(): function test_parse_headers (line 68) | def test_parse_headers(input, expected): function test_header_size_exceeded (line 73) | async def test_header_size_exceeded(): function test_header_size_increased_okay (line 91) | async def test_header_size_increased_okay(): function test_header_size_exceeded_maxed_out (line 111) | async def test_header_size_exceeded_maxed_out(): function test_header_size_exceeded_raised_ceiling (line 131) | async def test_header_size_exceeded_raised_ceiling(raised_ceiling): function test_raw_headers (line 150) | def test_raw_headers(app): function test_request_line (line 169) | def test_request_line(app): function test_parse_accept_ordered_okay (line 199) | def test_parse_accept_ordered_okay(raw, expected_subtype): function test_bad_accept (line 214) | def test_bad_accept(raw): function test_empty_accept (line 219) | def test_empty_accept(): function test_wildcard_accept_set_ok (line 225) | def test_wildcard_accept_set_ok(): function test_accept_parsed_against_str (line 242) | def test_accept_parsed_against_str(): function test_media_type_matching (line 247) | def test_media_type_matching(): function test_accept_matching (line 278) | def test_accept_matching(value, other, outcome): function test_value_in_accept (line 283) | def test_value_in_accept(value): function test_value_not_in_accept (line 291) | def test_value_not_in_accept(value): function test_browser_headers_general (line 315) | def test_browser_headers_general(header, expected): function test_browser_headers_specific (line 336) | def test_browser_headers_specific(header, expected): function test_accept_ordering (line 358) | def test_accept_ordering(raw): function test_not_accept_wildcard (line 368) | def test_not_accept_wildcard(): function test_accept_misc (line 383) | def test_accept_misc(): function test_field_simple_accessor (line 437) | def test_field_simple_accessor(headers, expected): function test_field_hyphenated_accessor (line 449) | def test_field_hyphenated_accessor(headers, expected): function test_bad_accessor (line 454) | def test_bad_accessor(): function test_multiple_fields_accessor (line 461) | def test_multiple_fields_accessor(app: Sanic): FILE: tests/test_helpers.py function test_has_message_body (line 9) | def test_has_message_body(): function test_is_entity_header (line 22) | def test_is_entity_header(): function test_is_hop_by_hop_header (line 33) | def test_is_hop_by_hop_header(): function test_import_string_class (line 44) | def test_import_string_class(): function test_import_string_module (line 49) | def test_import_string_module(): function test_import_string_exception (line 54) | def test_import_string_exception(): FILE: tests/test_http.py function test_app (line 21) | def test_app(app: Sanic): function runner (line 37) | def runner(test_app: Sanic, port): function client (line 45) | def client(runner: ReusableClient): function test_full_message (line 67) | def test_full_message(client): function test_transfer_chunked (line 83) | def test_transfer_chunked(client): function test_url_encoding (line 101) | def test_url_encoding(client): function test_invalid_content_length (line 124) | def test_invalid_content_length(content_length, client): function test_invalid_chunk_length (line 151) | def test_invalid_chunk_length(chunk_length, client): function test_smuggle (line 170) | def test_smuggle(client): FILE: tests/test_http_alt_svc.py function test_http1_response_has_alt_svc (line 17) | def test_http1_response_has_alt_svc(port): FILE: tests/test_init.py function test_imports (line 24) | def test_imports(item): FILE: tests/test_json_decoding.py function default_back_to_ujson (line 19) | def default_back_to_ujson(): function test_change_decoder (line 24) | def test_change_decoder(): function test_change_decoder_to_some_custom (line 29) | def test_change_decoder_to_some_custom(): function test_default_decoder (line 50) | def test_default_decoder(): FILE: tests/test_json_encoding.py class Foo (line 32) | class Foo: method __json__ (line 35) | def __json__(self): function foo (line 40) | def foo(): function payload (line 45) | def payload(foo: Foo): function default_back_to_ujson (line 50) | def default_back_to_ujson(): function test_change_encoder (line 55) | def test_change_encoder(): function test_change_encoder_to_some_custom (line 60) | def test_change_encoder_to_some_custom(): function test_json_response_ujson (line 69) | def test_json_response_ujson(payload: dict[str, Foo]): function test_json_response_json (line 93) | def test_json_response_json(): FILE: tests/test_keep_alive_timeout.py function handler1 (line 40) | async def handler1(request): function handler2 (line 45) | async def handler2(request): function handler3 (line 50) | async def handler3(request): function set_ctx (line 55) | def set_ctx(request): function get_ctx (line 61) | def get_ctx(request): function handler_disabled (line 66) | async def handler_disabled(request): function test_keep_alive_timeout_reuse (line 74) | def test_keep_alive_timeout_reuse(port): function test_keep_alive_client_timeout (line 114) | def test_keep_alive_client_timeout(port): function test_keep_alive_server_timeout (line 151) | def test_keep_alive_server_timeout(port): function test_keep_alive_connection_context (line 191) | def test_keep_alive_connection_context(port): function test_keep_alive_config_false (line 228) | def test_keep_alive_config_false(port): FILE: tests/test_late_adds.py function late_app (line 10) | def late_app(app: Sanic): function test_late_route (line 16) | def test_late_route(late_app: Sanic): function test_late_middleware (line 28) | def test_late_middleware(late_app: Sanic): function test_late_signal (line 44) | def test_late_signal(late_app: Sanic): FILE: tests/test_logging.py function reset_logging (line 31) | def reset_logging(): function test_log (line 36) | def test_log(app): function test_logging_defaults (line 58) | def test_logging_defaults(debug): function test_logging_pass_customer_logconfig (line 84) | def test_logging_pass_customer_logconfig(): function test_logger (line 112) | async def test_logger(caplog): function test_logging_modified_root_logger_config (line 129) | def test_logging_modified_root_logger_config(): function test_access_log_client_ip_remote_addr (line 140) | def test_access_log_client_ip_remote_addr(monkeypatch): function test_access_log_client_ip_reqip (line 169) | def test_access_log_client_ip_reqip(monkeypatch): function test_verbosity (line 208) | def test_verbosity(app, caplog, app_verbosity, log_verbosity, exists): function test_colors_enum_format (line 233) | def test_colors_enum_format(): function test_debug_formatter_formatException (line 254) | def test_debug_formatter_formatException(atty, no_color, expected): function test_log_extra_config_respected (line 289) | def test_log_extra_config_respected(): FILE: tests/test_logo.py function test_get_logo_returns_expected_logo (line 25) | def test_get_logo_returns_expected_logo(tty, full, expected): function test_get_logo_returns_no_colors_on_apple_terminal (line 32) | def test_get_logo_returns_no_colors_on_apple_terminal(): FILE: tests/test_middleware.py function test_middleware_request (line 16) | def test_middleware_request(app): function test_middleware_request_as_convenience (line 33) | def test_middleware_request_as_convenience(app): function test_middleware_response (line 55) | def test_middleware_response(app): function test_middleware_response_as_convenience (line 79) | def test_middleware_response_as_convenience(app): function test_middleware_response_as_convenience_called (line 110) | def test_middleware_response_as_convenience_called(app): function test_middleware_response_exception (line 134) | def test_middleware_response_exception(app): function test_middleware_response_raise_cancelled_error (line 155) | def test_middleware_response_raise_cancelled_error(app, caplog): function test_middleware_response_raise_exception (line 177) | def test_middleware_response_raise_exception(app, caplog): function test_middleware_override_request (line 201) | def test_middleware_override_request(app): function test_middleware_override_response (line 216) | def test_middleware_override_response(app): function test_middleware_order (line 231) | def test_middleware_order(app): function test_request_middleware_executes_once (line 268) | def test_request_middleware_executes_once(app): function test_middleware_added_response (line 288) | def test_middleware_added_response(app): function test_middleware_return_response (line 302) | def test_middleware_return_response(app): function test_middleware_run_on_timeout (line 326) | def test_middleware_run_on_timeout(app): FILE: tests/test_middleware_priority.py function reset_middleware (line 38) | def reset_middleware(): function test_add_register_priority (line 43) | def test_add_register_priority(app: Sanic): function test_add_register_named_priority (line 56) | def test_add_register_named_priority(app: Sanic): function test_add_decorator_priority (line 71) | def test_add_decorator_priority(app: Sanic): function test_add_convenience_priority (line 84) | def test_add_convenience_priority(app: Sanic): function test_add_conflicting_priority (line 97) | def test_add_conflicting_priority(app: Sanic): function test_add_conflicting_priority_named (line 106) | def test_add_conflicting_priority_named(app: Sanic): function test_request_middleware_order_priority (line 121) | def test_request_middleware_order_priority(app: Sanic, expected, priorit... function test_response_middleware_order_priority (line 146) | def test_response_middleware_order_priority(app: Sanic, expected, priori... FILE: tests/test_motd.py function reset (line 15) | def reset(): function test_logo_base (line 22) | def test_logo_base(app, run_startup): function test_motd_with_expected_info (line 29) | def test_motd_with_expected_info(app, run_startup): function test_motd_init (line 40) | def test_motd_init(): function test_motd_display (line 49) | def test_motd_display(caplog): function test_reload_dirs (line 71) | def test_reload_dirs(app): FILE: tests/test_multiprocessing.py function test_multiprocessing (line 31) | def test_multiprocessing(app, port): function test_multiprocessing_with_blueprint (line 62) | def test_multiprocessing_with_blueprint(app: object, port) -> object: function handler (line 89) | def handler(request): function stop (line 93) | def stop(app): function test_pickle_app (line 99) | def test_pickle_app(app, protocol, port): function test_pickle_app_with_bp (line 112) | def test_pickle_app_with_bp(app, protocol, port): function test_pickle_app_with_static (line 127) | def test_pickle_app_with_static(app, protocol): function test_main_process_event (line 144) | def test_main_process_event(app, caplog, port): FILE: tests/test_named_routes.py function test_versioned_named_routes_get (line 20) | def test_versioned_named_routes_get(method): function test_shorthand_default_routes_get (line 77) | def test_shorthand_default_routes_get(): function test_shorthand_named_routes_get (line 88) | def test_shorthand_named_routes_get(): function test_shorthand_named_routes_post (line 121) | def test_shorthand_named_routes_post(): function test_shorthand_named_routes_put (line 134) | def test_shorthand_named_routes_put(): function test_shorthand_named_routes_delete (line 147) | def test_shorthand_named_routes_delete(): function test_shorthand_named_routes_patch (line 160) | def test_shorthand_named_routes_patch(): function test_shorthand_named_routes_head (line 173) | def test_shorthand_named_routes_head(): function test_shorthand_named_routes_options (line 186) | def test_shorthand_named_routes_options(): function test_named_static_routes (line 199) | def test_named_static_routes(): function test_named_dynamic_route (line 223) | def test_named_dynamic_route(): function test_dynamic_named_route_regex (line 246) | def test_dynamic_named_route_regex(): function test_dynamic_named_route_path (line 265) | def test_dynamic_named_route_path(): function test_dynamic_named_route_unhashable (line 284) | def test_dynamic_named_route_unhashable(): function test_websocket_named_route (line 307) | def test_websocket_named_route(): function test_websocket_named_route_with_subprotocols (line 322) | def test_websocket_named_route_with_subprotocols(): function test_static_add_named_route (line 336) | def test_static_add_named_route(): function test_dynamic_add_named_route (line 361) | def test_dynamic_add_named_route(): function test_dynamic_add_named_route_unhashable (line 379) | def test_dynamic_add_named_route_unhashable(): function test_overload_routes (line 404) | def test_overload_routes(): FILE: tests/test_naming.py function factory (line 4) | def factory(sanic_cls: type[Sanic], blueprint_cls: type[Blueprint]): function test_vanilla_sanic (line 21) | def test_vanilla_sanic(): function test_custom_app (line 30) | def test_custom_app(): function test_custom_blueprint (line 44) | def test_custom_blueprint(): FILE: tests/test_payload_too_large.py function test_payload_too_large_from_error_handler (line 5) | def test_payload_too_large_from_error_handler(app): function test_payload_too_large_at_data_received_default (line 21) | def test_payload_too_large_at_data_received_default(app): function test_payload_too_large_at_on_header_default (line 33) | def test_payload_too_large_at_on_header_default(app): FILE: tests/test_pipelining.py function test_no_body_requests (line 6) | def test_no_body_requests(app, port): function test_json_body_requests (line 27) | def test_json_body_requests(app, port): function test_streaming_body_requests (line 50) | def test_streaming_body_requests(app, port): function test_bad_headers (line 80) | def test_bad_headers(app, port): FILE: tests/test_prepare.py function no_skip (line 14) | def no_skip(): function get_primary (line 26) | def get_primary(app: Sanic) -> ApplicationServerInfo: function test_dev (line 30) | def test_dev(app: Sanic): function test_motd_display (line 37) | def test_motd_display(app: Sanic): function test_reload_dir (line 45) | def test_reload_dir(app: Sanic, dirs, caplog): function test_fast (line 62) | def test_fast(app: Sanic, caplog): FILE: tests/test_redirect.py function redirect_app (line 9) | def redirect_app(app): function test_redirect_default_302 (line 41) | def test_redirect_default_302(redirect_app): function test_redirect_headers_none (line 54) | def test_redirect_headers_none(redirect_app): function test_redirect_with_301 (line 63) | def test_redirect_with_301(redirect_app): function test_get_then_redirect_follow_redirect (line 75) | def test_get_then_redirect_follow_redirect(redirect_app): function test_chained_redirect (line 87) | def test_chained_redirect(redirect_app): function test_redirect_with_header_injection (line 99) | def test_redirect_with_header_injection(redirect_app): function test_redirect_with_params (line 120) | def test_redirect_with_params(app, test_str): FILE: tests/test_request.py function test_no_request_id_not_called (line 14) | def test_no_request_id_not_called(monkeypatch): function test_request_id_generates_from_request (line 22) | def test_request_id_generates_from_request(monkeypatch): function test_request_id_defaults_uuid (line 33) | def test_request_id_defaults_uuid(): function test_name_none (line 43) | def test_name_none(): function test_name_from_route (line 49) | def test_name_from_route(): function test_name_from_set (line 57) | def test_name_from_set(): function test_request_id (line 72) | def test_request_id(request_id, expected_type): function test_custom_generator (line 86) | def test_custom_generator(): function test_route_assigned_to_request (line 106) | def test_route_assigned_to_request(app): function test_protocol_attribute (line 115) | def test_protocol_attribute(app): function test_ipv6_address_is_not_wrapped (line 130) | def test_ipv6_address_is_not_wrapped(app): function test_request_accept (line 148) | def test_request_accept(): function test_bad_url_parse (line 198) | def test_bad_url_parse(): function test_request_scope_raises_exception_when_no_asgi (line 212) | def test_request_scope_raises_exception_when_no_asgi(): function test_request_scope_is_not_none_when_running_in_asgi (line 226) | async def test_request_scope_is_not_none_when_running_in_asgi(app): function test_cannot_get_request_outside_of_cycle (line 238) | def test_cannot_get_request_outside_of_cycle(): function test_get_current_request (line 243) | def test_get_current_request(app): function test_request_stream_id (line 252) | def test_request_stream_id(app): function test_request_safe (line 276) | def test_request_safe(method, safe): function test_request_idempotent (line 293) | def test_request_idempotent(method, idempotent): function test_request_cacheable (line 310) | def test_request_cacheable(method, cacheable): function test_custom_ctx (line 315) | def test_custom_ctx(): FILE: tests/test_request_cancel.py function test_request_cancel_when_connection_lost (line 10) | async def test_request_cancel_when_connection_lost(app): function test_stream_request_cancel_when_conn_lost (line 39) | async def test_stream_request_cancel_when_conn_lost(app): FILE: tests/test_request_data.py function test_custom_context (line 12) | def test_custom_context(app): function test_app_injection (line 67) | def test_app_injection(app): FILE: tests/test_request_stream.py function test_request_stream_method_view (line 15) | def test_request_stream_method_view(app): function test_request_stream_100_continue (line 51) | def test_request_stream_100_continue(app, headers, expect_raise_exception): function test_request_stream_app (line 78) | def test_request_stream_app(app): function test_request_stream_app_asgi (line 179) | async def test_request_stream_app_asgi(app): function test_request_stream_handle_exception (line 279) | def test_request_stream_handle_exception(app): function test_request_stream_blueprint (line 303) | def test_request_stream_blueprint(app): function test_request_stream (line 423) | def test_request_stream(app): function test_streaming_new_api (line 510) | def test_streaming_new_api(app): function test_streaming_echo (line 550) | def test_streaming_echo(): FILE: tests/test_requests.py function encode_basic_auth_credentials (line 25) | def encode_basic_auth_credentials(username, password): function test_sync (line 34) | def test_sync(app): function test_sync_asgi (line 45) | async def test_sync_asgi(app): function test_ip (line 55) | def test_ip(app): function test_url_asgi (line 66) | async def test_url_asgi(app): function test_text (line 81) | def test_text(app): function test_html (line 91) | def test_html(app): function test_text_asgi (line 127) | async def test_text_asgi(app): function test_headers (line 137) | def test_headers(app): function test_headers_asgi (line 149) | async def test_headers_asgi(app): function test_non_str_headers (line 160) | def test_non_str_headers(app): function test_non_str_headers_asgi (line 172) | async def test_non_str_headers_asgi(app): function test_invalid_response (line 183) | def test_invalid_response(app): function test_invalid_response_asgi (line 198) | async def test_invalid_response_asgi(app): function test_json (line 212) | def test_json(app): function test_json_asgi (line 225) | async def test_json_asgi(app): function test_empty_json (line 237) | def test_empty_json(app): function test_empty_json_asgi (line 249) | async def test_empty_json_asgi(app): function test_echo_json (line 260) | def test_echo_json(app): function test_echo_json_asgi (line 273) | async def test_echo_json_asgi(app): function test_invalid_json (line 285) | def test_invalid_json(app): function test_invalid_json_asgi (line 297) | async def test_invalid_json_asgi(app): function test_query_string (line 308) | def test_query_string(app): function test_popped_stays_popped (line 324) | def test_popped_stays_popped(app): function test_query_string_asgi (line 336) | async def test_query_string_asgi(app): function test_uri_template (line 352) | def test_uri_template(app): function test_uri_template_asgi (line 362) | async def test_uri_template_asgi(app): function test_token (line 384) | def test_token(app, auth_type, token): function test_credentials (line 423) | def test_credentials(app, capfd, auth_type, token, username, password): function test_content_type (line 462) | def test_content_type(app): function test_content_type_asgi (line 478) | async def test_content_type_asgi(app): function test_standard_forwarded (line 493) | def test_standard_forwarded(app): function test_standard_forwarded_asgi (line 609) | async def test_standard_forwarded_asgi(app): function test_remote_addr_with_two_proxies (line 727) | def test_remote_addr_with_two_proxies(app): function test_remote_addr_with_two_proxies_asgi (line 769) | async def test_remote_addr_with_two_proxies_asgi(app): function test_remote_addr_without_proxy (line 809) | def test_remote_addr_without_proxy(app): function test_remote_addr_without_proxy_asgi (line 833) | async def test_remote_addr_without_proxy_asgi(app): function test_remote_addr_custom_headers (line 856) | def test_remote_addr_custom_headers(app): function test_remote_addr_custom_headers_asgi (line 882) | async def test_remote_addr_custom_headers_asgi(app): function test_forwarded_scheme (line 907) | def test_forwarded_scheme(app): function test_match_info (line 928) | def test_match_info(app): function test_match_info_asgi (line 940) | async def test_match_info_asgi(app): function test_post_json (line 956) | def test_post_json(app): function test_post_json_asgi (line 974) | async def test_post_json_asgi(app): function test_post_form_urlencoded (line 991) | def test_post_form_urlencoded(app): function test_post_form_urlencoded_asgi (line 1008) | async def test_post_form_urlencoded_asgi(app): function test_post_form_urlencoded_keep_blanks (line 1024) | def test_post_form_urlencoded_keep_blanks(app): function test_post_form_urlencoded_keep_blanks_asgi (line 1042) | async def test_post_form_urlencoded_keep_blanks_asgi(app): function test_post_form_urlencoded_drop_blanks (line 1059) | def test_post_form_urlencoded_drop_blanks(app): function test_post_form_urlencoded_drop_blanks_asgi (line 1075) | async def test_post_form_urlencoded_drop_blanks_asgi(app): function test_post_form_multipart_form_data (line 1105) | def test_post_form_multipart_form_data(app, payload): function test_post_form_multipart_form_data_asgi (line 1133) | async def test_post_form_multipart_form_data_asgi(app, payload): function test_url_attributes_no_ssl (line 1155) | def test_url_attributes_no_ssl(app, path, query, expected_url): function test_url_attributes_no_ssl_asgi (line 1181) | async def test_url_attributes_no_ssl_asgi(app, path, query, expected_url): function test_form_with_multiple_values (line 1198) | def test_form_with_multiple_values(app): function test_form_with_multiple_values_asgi (line 1215) | async def test_form_with_multiple_values_asgi(app): function test_request_string_representation (line 1231) | def test_request_string_representation(app): function test_request_string_representation_asgi (line 1241) | async def test_request_string_representation_asgi(app): function test_request_multipart_files (line 1327) | def test_request_multipart_files(app, payload, filename): function test_request_multipart_files_asgi (line 1396) | async def test_request_multipart_files_asgi(app, payload, filename): function test_request_multipart_file_with_json_content_type (line 1407) | def test_request_multipart_file_with_json_content_type(app): function test_request_multipart_file_with_json_content_type_asgi (line 1430) | async def test_request_multipart_file_with_json_content_type_asgi(app): function test_request_multipart_file_without_field_name (line 1452) | def test_request_multipart_file_without_field_name(app, caplog): function test_request_multipart_file_duplicate_filed_name (line 1478) | def test_request_multipart_file_duplicate_filed_name(app): function test_request_multipart_file_duplicate_filed_name_asgi (line 1514) | async def test_request_multipart_file_duplicate_filed_name_asgi(app): function test_request_multipart_with_multiple_files_and_type (line 1547) | def test_request_multipart_with_multiple_files_and_type(app): function test_request_multipart_with_multiple_files_and_type_asgi (line 1569) | async def test_request_multipart_with_multiple_files_and_type_asgi(app): function test_request_repr (line 1590) | def test_request_repr(app): function test_request_repr_asgi (line 1603) | async def test_request_repr_asgi(app): function test_request_bool (line 1615) | def test_request_bool(app): function test_request_parsing_form_failed (line 1624) | def test_request_parsing_form_failed(app, caplog): function test_request_parsing_form_failed_asgi (line 1647) | async def test_request_parsing_form_failed_asgi(app, caplog): function test_request_args_no_query_string (line 1669) | def test_request_args_no_query_string(app): function test_request_args_no_query_string_await (line 1680) | async def test_request_args_no_query_string_await(app): function test_request_query_args (line 1690) | def test_request_query_args(app): function test_request_query_args_asgi (line 1727) | async def test_request_query_args_asgi(app): function test_request_query_args_custom_parsing (line 1763) | def test_request_query_args_custom_parsing(app): function test_request_query_args_custom_parsing_asgi (line 1797) | async def test_request_query_args_custom_parsing_asgi(app): function test_request_cookies (line 1830) | def test_request_cookies(app): function test_request_cookies_asgi (line 1844) | async def test_request_cookies_asgi(app): function test_request_cookies_without_cookies (line 1857) | def test_request_cookies_without_cookies(app): function test_request_cookies_without_cookies_asgi (line 1868) | async def test_request_cookies_without_cookies_asgi(app): function test_request_port (line 1878) | def test_request_port(app): function test_request_port_asgi (line 1890) | async def test_request_port_asgi(app): function test_request_socket (line 1901) | def test_request_socket(app): function test_request_server_name (line 1918) | def test_request_server_name(app): function test_request_server_name_in_host_header (line 1927) | def test_request_server_name_in_host_header(app): function test_request_server_name_forwarded (line 1948) | def test_request_server_name_forwarded(app): function test_request_server_port (line 1965) | def test_request_server_port(app): function test_request_server_port_in_host_header (line 1975) | def test_request_server_port_in_host_header(app): function test_request_server_port_forwarded (line 1999) | def test_request_server_port_forwarded(app): function test_request_form_invalid_content_type (line 2016) | def test_request_form_invalid_content_type(app): function test_server_name_and_url_for (line 2026) | def test_server_name_and_url_for(app): function test_url_for_with_forwarded_request (line 2043) | def test_url_for_with_forwarded_request(app): function test_request_form_invalid_content_type_asgi (line 2083) | async def test_request_form_invalid_content_type_asgi(app): function test_endpoint_basic (line 2093) | def test_endpoint_basic(): function test_endpoint_basic_asgi (line 2106) | async def test_endpoint_basic_asgi(): function test_endpoint_named_app (line 2118) | def test_endpoint_named_app(): function test_endpoint_named_app_asgi (line 2131) | async def test_endpoint_named_app_asgi(): function test_endpoint_blueprint (line 2143) | def test_endpoint_blueprint(): function test_endpoint_blueprint_asgi (line 2159) | async def test_endpoint_blueprint_asgi(): function test_url_for_without_server_name (line 2174) | def test_url_for_without_server_name(app): function test_safe_method_with_body_ignored (line 2190) | def test_safe_method_with_body_ignored(app): function test_safe_method_with_body (line 2207) | def test_safe_method_with_body(app): function test_conflicting_body_methods_overload_error (line 2225) | async def test_conflicting_body_methods_overload_error(app: Sanic): function test_conflicting_body_methods_overload (line 2241) | def test_conflicting_body_methods_overload(app: Sanic): function test_handler_overload_error (line 2299) | async def test_handler_overload_error(app: Sanic): function test_handler_overload (line 2314) | def test_handler_overload(app: Sanic): FILE: tests/test_response.py function test_response_body_not_a_string (line 41) | def test_response_body_not_a_string(app): function sample_streaming_fn (line 54) | async def sample_streaming_fn(request, response=None): function test_method_not_allowed (line 63) | def test_method_not_allowed(): function test_response_header (line 103) | def test_response_header(app): function test_response_content_length (line 117) | def test_response_content_length(app): function test_response_content_length_with_different_data_types (line 150) | def test_response_content_length_with_different_data_types(app): function json_app (line 164) | def json_app(app): function test_json_response (line 192) | def test_json_response(json_app): function test_no_content (line 205) | def test_no_content(json_app): function streaming_app (line 230) | def streaming_app(app): function non_chunked_streaming_app (line 239) | def non_chunked_streaming_app(app): function test_chunked_streaming_adds_correct_headers (line 251) | def test_chunked_streaming_adds_correct_headers(streaming_app): function test_chunked_streaming_returns_correct_content (line 260) | def test_chunked_streaming_returns_correct_content(streaming_app): function test_chunked_streaming_returns_correct_content_asgi (line 266) | async def test_chunked_streaming_returns_correct_content_asgi(streaming_... function test_non_chunked_streaming_adds_correct_headers (line 271) | def test_non_chunked_streaming_adds_correct_headers(non_chunked_streamin... function test_non_chunked_streaming_adds_correct_headers_asgi (line 280) | async def test_non_chunked_streaming_adds_correct_headers_asgi( function test_non_chunked_streaming_returns_correct_content (line 289) | def test_non_chunked_streaming_returns_correct_content( function test_stream_response_with_cookies (line 296) | def test_stream_response_with_cookies(app): function test_stream_response_without_cookies (line 315) | def test_stream_response_without_cookies(app): function static_file_directory (line 325) | def static_file_directory(): function path_str_to_path_obj (line 333) | def path_str_to_path_obj(static_file_directory: Union[Path, str]): function get_file_content (line 339) | def get_file_content(static_file_directory: Union[Path, str], file_name:... function get_file_last_modified_timestamp (line 346) | def get_file_last_modified_timestamp( function test_file_response (line 358) | def test_file_response(app: Sanic, file_name, static_file_directory, sta... function test_file_response_custom_filename (line 383) | def test_file_response_custom_filename( function test_file_head_response (line 402) | def test_file_head_response(app: Sanic, file_name, static_file_directory): function test_file_stream_response (line 435) | def test_file_stream_response(app: Sanic, file_name, static_file_directo... function test_file_stream_response_custom_filename (line 460) | def test_file_stream_response_custom_filename( function test_file_stream_head_response (line 479) | def test_file_stream_head_response( function test_file_stream_response_range (line 524) | def test_file_stream_response_range( function test_raw_response (line 551) | def test_raw_response(app): function test_empty_response (line 561) | def test_empty_response(app): function test_direct_response_stream (line 571) | def test_direct_response_stream(app: Sanic): function test_direct_response_stream_asgi (line 587) | async def test_direct_response_stream_asgi(app: Sanic): function test_multiple_responses (line 601) | def test_multiple_responses( function test_send_response_after_eof_should_fail (line 701) | def test_send_response_after_eof_should_fail( function test_send_response_after_eof_should_fail_asgi (line 733) | async def test_send_response_after_eof_should_fail_asgi( function test_file_response_headers (line 768) | def test_file_response_headers( function test_file_validate (line 859) | def test_file_validate(app: Sanic, static_file_directory: str): function test_file_validating_invalid_header (line 906) | def test_file_validating_invalid_header( function test_file_validating_304_response_file_route (line 941) | def test_file_validating_304_response_file_route( function test_file_validating_304_response (line 971) | def test_file_validating_304_response( function test_stream_response_with_default_headers (line 993) | def test_stream_response_with_default_headers(app: Sanic): FILE: tests/test_response_file.py function test_file_timestamp_validation (line 42) | async def test_file_timestamp_validation( function test_guess_content_type (line 71) | def test_guess_content_type(file_path, expected): function test_guess_content_type_with_custom_fallback (line 77) | def test_guess_content_type_with_custom_fallback(): function test_guess_content_type_with_pathlib (line 83) | def test_guess_content_type_with_pathlib(): FILE: tests/test_response_json.py function json_app (line 19) | def json_app(app: Sanic): function test_body_can_be_retrieved (line 27) | def test_body_can_be_retrieved(json_app: Sanic): function test_body_can_be_set (line 32) | def test_body_can_be_set(json_app: Sanic): function test_raw_body_can_be_retrieved (line 43) | def test_raw_body_can_be_retrieved(json_app: Sanic): function test_raw_body_can_be_set (line 51) | def test_raw_body_can_be_set(json_app: Sanic): function test_raw_body_cant_be_retrieved_after_body_set (line 63) | def test_raw_body_cant_be_retrieved_after_body_set(json_app: Sanic): function test_raw_body_can_be_reset_after_body_set (line 75) | def test_raw_body_can_be_reset_after_body_set(json_app: Sanic): function test_set_body_method (line 88) | def test_set_body_method(json_app: Sanic): function test_set_body_method_after_body_set (line 99) | def test_set_body_method_after_body_set(json_app: Sanic): function test_custom_dumps_and_kwargs (line 112) | def test_custom_dumps_and_kwargs(json_app: Sanic): function test_override_dumps_and_kwargs (line 124) | def test_override_dumps_and_kwargs(json_app: Sanic): function test_append (line 143) | def test_append(json_app: Sanic): function test_extend (line 156) | def test_extend(json_app: Sanic): function test_update (line 169) | def test_update(json_app: Sanic): function test_pop_dict (line 182) | def test_pop_dict(json_app: Sanic): function test_pop_list (line 199) | def test_pop_list(json_app: Sanic): function test_json_response_class_sets_proper_content_type (line 218) | def test_json_response_class_sets_proper_content_type(json_app: Sanic): FILE: tests/test_response_timeout.py function response_timeout_app (line 15) | def response_timeout_app(): function response_timeout_default_app (line 32) | def response_timeout_default_app(): function response_handler_cancelled_app (line 45) | def response_handler_cancelled_app(): function test_server_error_response_timeout (line 67) | def test_server_error_response_timeout(response_timeout_app): function test_default_server_error_response_timeout (line 73) | def test_default_server_error_response_timeout(response_timeout_default_... function test_response_handler_cancelled (line 79) | def test_response_handler_cancelled(response_handler_cancelled_app): function test_response_timeout_not_applied (line 86) | def test_response_timeout_not_applied(caplog): FILE: tests/test_routes.py function test_matching (line 125) | def test_matching(path, headers, expected): function test_versioned_routes_get (line 186) | def test_versioned_routes_get(app, method): function test_shorthand_routes_get (line 205) | def test_shorthand_routes_get(app): function test_shorthand_routes_multiple (line 217) | def test_shorthand_routes_multiple(app): function test_route_strict_slash (line 234) | def test_route_strict_slash(app): function test_route_invalid_parameter_syntax (line 256) | def test_route_invalid_parameter_syntax(app): function test_route_strict_slash_default_value (line 266) | def test_route_strict_slash_default_value(): function test_route_strict_slash_without_passing_default_value (line 277) | def test_route_strict_slash_without_passing_default_value(app): function test_route_strict_slash_default_value_can_be_overwritten (line 286) | def test_route_strict_slash_default_value_can_be_overwritten(): function test_route_slashes_overload (line 297) | def test_route_slashes_overload(app): function test_route_optional_slash (line 319) | def test_route_optional_slash(app): function test_route_strict_slashes_set_to_false_and_host_is_a_list (line 331) | def test_route_strict_slashes_set_to_false_and_host_is_a_list(app): function test_shorthand_routes_post (line 372) | def test_shorthand_routes_post(app): function test_shorthand_routes_put (line 384) | def test_shorthand_routes_put(app): function test_shorthand_routes_delete (line 396) | def test_shorthand_routes_delete(app): function test_shorthand_routes_patch (line 408) | def test_shorthand_routes_patch(app): function test_shorthand_routes_head (line 420) | def test_shorthand_routes_head(app): function test_shorthand_routes_options (line 432) | def test_shorthand_routes_options(app): function test_static_routes (line 444) | def test_static_routes(app): function test_dynamic_route (line 460) | def test_dynamic_route(app): function test_dynamic_route_string (line 476) | def test_dynamic_route_string(app): function test_dynamic_route_int (line 495) | def test_dynamic_route_int(app): function test_dynamic_route_number (line 511) | def test_dynamic_route_number(app): function test_dynamic_route_regex (line 539) | def test_dynamic_route_regex(app): function test_dynamic_route_uuid (line 557) | def test_dynamic_route_uuid(app): function test_dynamic_route_path (line 580) | def test_dynamic_route_path(app): function test_dynamic_route_unhashable (line 606) | def test_dynamic_route_unhashable(app): function test_websocket_route (line 625) | def test_websocket_route(app, url): function test_websocket_route_invalid_handler (line 639) | def test_websocket_route_invalid_handler(app): function test_websocket_route_asgi (line 653) | async def test_websocket_route_asgi(app, url): function test_websocket_route_with_subprotocols (line 678) | def test_websocket_route_with_subprotocols(app, subprotocols, expected): function test_add_webscoket_route (line 695) | def test_add_webscoket_route(app, strict_slashes): function test_add_webscoket_route_with_version (line 708) | def test_add_webscoket_route_with_version(app): function test_route_duplicate (line 721) | def test_route_duplicate(app): function test_double_stack_route (line 743) | def test_double_stack_route(app): function test_websocket_route_asgi_when_first_and_second_set (line 756) | async def test_websocket_route_asgi_when_first_and_second_set(app): function test_method_not_allowed (line 772) | def test_method_not_allowed(app): function test_static_add_route (line 785) | def test_static_add_route(app, strict_slashes): function test_unquote_add_route (line 803) | def test_unquote_add_route(app, unquote): function test_dynamic_add_route (line 817) | def test_dynamic_add_route(app): function test_dynamic_add_route_string (line 831) | def test_dynamic_add_route_string(app): function test_dynamic_add_route_int (line 850) | def test_dynamic_add_route_int(app): function test_dynamic_add_route_number (line 867) | def test_dynamic_add_route_number(app): function test_dynamic_add_route_regex (line 896) | def test_dynamic_add_route_regex(app): function test_dynamic_add_route_unhashable (line 915) | def test_dynamic_add_route_unhashable(app): function test_add_route_duplicate (line 934) | def test_add_route_duplicate(app): function test_add_route_method_not_allowed (line 958) | def test_add_route_method_not_allowed(app): function test_removing_slash (line 971) | def test_removing_slash(app): function test_overload_routes (line 983) | def test_overload_routes(app): function test_unmergeable_overload_routes (line 1012) | def test_unmergeable_overload_routes(app): function test_unicode_routes (line 1052) | def test_unicode_routes(app): function test_uri_with_different_method_and_different_params (line 1070) | def test_uri_with_different_method_and_different_params(app): function test_uri_with_different_method_and_same_params (line 1088) | def test_uri_with_different_method_and_same_params(app): function test_route_raise_ParameterNameConflicts (line 1106) | def test_route_raise_ParameterNameConflicts(app): function test_route_invalid_host (line 1115) | def test_route_invalid_host(app): function test_route_with_regex_group (line 1128) | def test_route_with_regex_group(app): function test_route_with_regex_named_group (line 1137) | def test_route_with_regex_named_group(app): function test_route_with_regex_named_group_invalid (line 1146) | def test_route_with_regex_named_group_invalid(app): function test_route_with_regex_group_ambiguous (line 1159) | def test_route_with_regex_group_ambiguous(app): function test_route_with_bad_named_param (line 1175) | def test_route_with_bad_named_param(app): function test_routes_with_and_without_slash_definitions (line 1184) | def test_routes_with_and_without_slash_definitions(app): function test_added_route_ctx_kwargs (line 1240) | def test_added_route_ctx_kwargs(app): function test_added_bad_route_kwargs (line 1251) | def test_added_bad_route_kwargs(app): function test_added_callable_route_ctx_kwargs (line 1260) | async def test_added_callable_route_ctx_kwargs(app): function test_duplicate_route_error (line 1278) | async def test_duplicate_route_error(app): FILE: tests/test_server_events.py function create_listener (line 25) | def create_listener(listener_name, in_list): function create_listener_no_loop (line 33) | def create_listener_no_loop(listener_name, in_list): function start_stop_app (line 41) | def start_stop_app(random_name_app, **run_kwargs): function test_single_listener (line 56) | def test_single_listener(app, listener_name): function test_single_listener_no_loop (line 66) | def test_single_listener_no_loop(app, listener_name): function test_register_listener (line 76) | def test_register_listener(app, listener_name): function test_all_listeners (line 89) | def test_all_listeners(app): function test_all_listeners_as_convenience (line 99) | def test_all_listeners_as_convenience(app): function test_trigger_before_events_create_server (line 111) | async def test_trigger_before_events_create_server(app, port): function test_trigger_before_events_create_server_missing_event (line 130) | async def test_trigger_before_events_create_server_missing_event(app): function test_create_server_trigger_events (line 143) | def test_create_server_trigger_events(app): function test_missing_startup_raises_exception (line 205) | async def test_missing_startup_raises_exception(app, port): function test_reload_listeners_attached (line 217) | def test_reload_listeners_attached(app): function test_priority_ordering (line 229) | def test_priority_ordering(app): FILE: tests/test_server_loop.py function test_raises_warning_if_os_is_windows (line 15) | def test_raises_warning_if_os_is_windows(caplog): function test_raises_warning_if_uvloop_not_installed (line 36) | def test_raises_warning_if_uvloop_not_installed(caplog): function test_logs_when_install_and_runtime_config_mismatch (line 58) | def test_logs_when_install_and_runtime_config_mismatch(caplog, monkeypat... function test_sets_loop_policy_only_when_not_already_set (line 92) | def test_sets_loop_policy_only_when_not_already_set(monkeypatch): FILE: tests/test_signal_handlers.py function stop (line 24) | async def stop(app, loop): function set_loop (line 32) | def set_loop(app, loop): function after (line 41) | def after(app, loop): function test_register_system_signals (line 47) | def test_register_system_signals(app): function test_no_register_system_signals_fails (line 63) | def test_no_register_system_signals_fails(app): function test_dont_register_system_signals (line 84) | def test_dont_register_system_signals(app): function test_windows_workaround (line 100) | def test_windows_workaround(): function test_signals_with_invalid_invocation (line 146) | def test_signals_with_invalid_invocation(app): function test_signal_server_lifecycle_exception (line 159) | def test_signal_server_lifecycle_exception(app: Sanic): FILE: tests/test_signals.py function test_add_signal (line 15) | def test_add_signal(app): function test_add_signal_method_handler (line 23) | def test_add_signal_method_handler(app): function test_add_signal_decorator (line 48) | def test_add_signal_decorator(app): function test_invalid_signal (line 68) | def test_invalid_signal(app, signal): function test_dispatch_signal_triggers_event (line 76) | async def test_dispatch_signal_triggers_event(app): function test_dispatch_signal_triggers_correct_event (line 92) | async def test_dispatch_signal_triggers_correct_event(app): function test_dispatch_signal_with_enum_event (line 118) | async def test_dispatch_signal_with_enum_event(app): function test_dispatch_signal_with_enum_event_to_event (line 137) | async def test_dispatch_signal_with_enum_event_to_event(app): function test_dispatch_signal_triggers_multiple_handlers (line 156) | async def test_dispatch_signal_triggers_multiple_handlers(app): function test_dispatch_signal_triggers_multiple_events (line 179) | async def test_dispatch_signal_triggers_multiple_events(app): function test_dispatch_signal_with_multiple_handlers_triggers_event_once (line 199) | async def test_dispatch_signal_with_multiple_handlers_triggers_event_onc... function test_dispatch_signal_triggers_dynamic_route (line 219) | async def test_dispatch_signal_triggers_dynamic_route(app): function test_dispatch_signal_triggers_parameterized_dynamic_route_event (line 235) | async def test_dispatch_signal_triggers_parameterized_dynamic_route_even... function test_dispatch_signal_triggers_starred_dynamic_route_event (line 251) | async def test_dispatch_signal_triggers_starred_dynamic_route_event(app): function test_dispatch_signal_triggers_with_requirements (line 267) | async def test_dispatch_signal_triggers_with_requirements(app): function test_dispatch_signal_to_event_with_requirements (line 284) | async def test_dispatch_signal_to_event_with_requirements(app): function test_dispatch_signal_triggers_with_requirements_exclusive (line 305) | async def test_dispatch_signal_triggers_with_requirements_exclusive(app): function test_dispatch_signal_to_event_with_requirements_exclusive (line 322) | async def test_dispatch_signal_to_event_with_requirements_exclusive(app): function test_dispatch_signal_triggers_with_context (line 347) | async def test_dispatch_signal_triggers_with_context(app): function test_dispatch_signal_to_event_with_context (line 362) | async def test_dispatch_signal_to_event_with_context(app): function test_dispatch_signal_triggers_with_context_fail (line 377) | async def test_dispatch_signal_triggers_with_context_fail(app): function test_dispatch_signal_to_dynamic_route_event (line 392) | async def test_dispatch_signal_to_dynamic_route_event(app): function test_dispatch_signal_triggers_on_bp (line 407) | async def test_dispatch_signal_triggers_on_bp(app): function test_dispatch_signal_triggers_on_bp_alone (line 436) | async def test_dispatch_signal_triggers_on_bp_alone(app): function test_dispatch_signal_triggers_event_on_bp (line 454) | async def test_dispatch_signal_triggers_event_on_bp(app): function test_dispatch_simple_signal_triggers (line 496) | async def test_dispatch_simple_signal_triggers(app): function test_dispatch_simple_signal_triggers_dynamic_foo (line 512) | async def test_dispatch_simple_signal_triggers_dynamic_foo(app): function test_dispatch_simple_signal_triggers_foo_bar (line 528) | async def test_dispatch_simple_signal_triggers_foo_bar(app): function test_dispatch_signal_triggers_event_on_bp_with_context (line 544) | async def test_dispatch_signal_triggers_event_on_bp_with_context(app): function test_bad_finalize (line 562) | def test_bad_finalize(app): function test_event_not_exist (line 579) | async def test_event_not_exist(app): function test_event_not_exist_on_bp (line 585) | async def test_event_not_exist_on_bp(app): function test_event_not_exist_with_autoregister (line 594) | async def test_event_not_exist_with_autoregister(app): function test_dispatch_signal_triggers_non_exist_event_with_autoregister (line 603) | async def test_dispatch_signal_triggers_non_exist_event_with_autoregiste... function test_dispatch_not_exist (line 624) | async def test_dispatch_not_exist(app): function test_event_on_bp_not_registered (line 632) | def test_event_on_bp_not_registered(): function test_signal_reservation (line 655) | def test_signal_reservation(app, event, expected): function test_report_exception (line 667) | async def test_report_exception(app: Sanic): function test_report_exception_runs (line 687) | def test_report_exception_runs(app: Sanic): function test_report_exception_runs_once_inline (line 703) | def test_report_exception_runs_once_inline(app: Sanic): function test_report_exception_runs_once_custom (line 725) | def test_report_exception_runs_once_custom(app: Sanic): function test_report_exception_runs_task (line 749) | def test_report_exception_runs_task(app: Sanic): FILE: tests/test_startup_errors.py function test_handle_os_error_address_in_use (line 13) | def test_handle_os_error_address_in_use(caplog): function test_handle_os_error_other_errno (line 22) | def test_handle_os_error_other_errno(caplog): function test_handle_os_error_non_os_error (line 32) | def test_handle_os_error_non_os_error(): function test_handle_server_error (line 39) | def test_handle_server_error(caplog): function test_handle_server_error_non_server_error (line 48) | def test_handle_server_error_non_server_error(): function test_maybe_handle_startup_error_exits_on_os_error (line 55) | def test_maybe_handle_startup_error_exits_on_os_error(): function test_maybe_handle_startup_error_exits_on_server_error (line 63) | def test_maybe_handle_startup_error_exits_on_server_error(): function test_maybe_handle_startup_error_raises_unhandled (line 71) | def test_maybe_handle_startup_error_raises_unhandled(): function test_maybe_handle_startup_error_raises_runtime_error (line 77) | def test_maybe_handle_startup_error_raises_runtime_error(): FILE: tests/test_static.py function double_dotted_directory_file (line 18) | def double_dotted_directory_file(static_file_directory: str): function get_file_path (line 33) | def get_file_path(static_file_directory, file_name): function get_file_content (line 37) | def get_file_content(static_file_directory, file_name): function large_file (line 44) | def large_file(static_file_directory): function symlink (line 57) | def symlink(static_file_directory): function hard_link (line 72) | def hard_link(static_file_directory): function test_static_file (line 90) | def test_static_file(app, static_file_directory, file_name): function test_static_file_pathlib (line 104) | def test_static_file_pathlib(app, static_file_directory, file_name): function test_static_file_pathlib_relative_path_traversal (line 122) | def test_static_file_pathlib_relative_path_traversal( function test_static_file_bytes (line 141) | def test_static_file_bytes(app, static_file_directory, file_name): function test_static_file_invalid_path (line 153) | def test_static_file_invalid_path(app, static_file_directory, file_name): function test_file_response_content_type (line 171) | def test_file_response_content_type( function test_static_file_content_type (line 196) | def test_static_file_content_type( function test_static_file_content_type_forced (line 207) | def test_static_file_content_type_forced(app, static_file_directory): function test_static_directory (line 223) | def test_static_directory(app, file_name, base_uri, static_file_directory): function test_static_head_request (line 236) | def test_static_head_request(app, file_name, static_file_directory): function test_static_content_range_correct (line 253) | def test_static_content_range_correct(app, file_name, static_file_direct... function test_static_content_range_front (line 273) | def test_static_content_range_front(app, file_name, static_file_directory): function test_static_content_range_back (line 293) | def test_static_content_range_back(app, file_name, static_file_directory): function test_static_content_range_empty (line 314) | def test_static_content_range_empty( function test_static_content_range_error (line 337) | def test_static_content_range_error(app, file_name, static_file_directory): function test_static_content_range_invalid_unit (line 355) | def test_static_content_range_invalid_unit( function test_static_content_range_invalid_start (line 373) | def test_static_content_range_invalid_start( function test_static_content_range_invalid_end (line 391) | def test_static_content_range_invalid_end( function test_static_content_range_invalid_parameters (line 409) | def test_static_content_range_invalid_parameters( function test_static_file_specified_host (line 428) | def test_static_file_specified_host(app, static_file_directory, file_name): function test_static_stream_large_file (line 446) | def test_static_stream_large_file( function test_use_modified_since (line 470) | def test_use_modified_since(app, static_file_directory, file_name): function test_file_not_found (line 489) | def test_file_not_found(app, static_file_directory): function test_static_name (line 500) | def test_static_name(app, static_file_directory, static_name, file_name): function test_nested_dir (line 508) | def test_nested_dir(app, static_file_directory): function test_handle_is_a_directory_error (line 517) | def test_handle_is_a_directory_error(app, static_file_directory): function test_stack_trace_on_not_found (line 533) | def test_stack_trace_on_not_found(app, static_file_directory, caplog): function test_no_stack_trace_on_not_found (line 548) | def test_no_stack_trace_on_not_found(app, static_file_directory, caplog): function test_multiple_statics_error (line 569) | async def test_multiple_statics_error(app, static_file_directory): function test_multiple_statics (line 580) | def test_multiple_statics(app, static_file_directory): function test_resource_type_default_error (line 602) | async def test_resource_type_default_error(app, static_file_directory): function test_resource_type_default (line 614) | def test_resource_type_default(app, static_file_directory): function test_resource_type_file (line 630) | def test_resource_type_file(app, static_file_directory): function test_resource_type_dir (line 647) | def test_resource_type_dir(app, static_file_directory): function test_resource_type_unknown (line 664) | def test_resource_type_unknown(app, static_file_directory, caplog): function test_dotted_dir_ok (line 673) | def test_dotted_dir_ok( function test_breakout (line 685) | def test_breakout(app: Sanic, static_file_directory: str): function test_double_backslash_prohibited_on_win32 (line 698) | def test_double_backslash_prohibited_on_win32( FILE: tests/test_static_directory.py function get_file_path (line 15) | def get_file_path(static_file_directory, file_name): function get_file_content (line 19) | def get_file_content(static_file_directory, file_name): function test_static_directory_view (line 25) | def test_static_directory_view(app: Sanic, static_file_directory: str): function test_static_index_single (line 34) | def test_static_index_single(app: Sanic, static_file_directory: str): function test_static_index_single_not_found (line 45) | def test_static_index_single_not_found(app: Sanic, static_file_directory... function test_static_index_multiple (line 52) | def test_static_index_multiple(app: Sanic, static_file_directory: str): function test_static_directory_view_and_index (line 67) | def test_static_directory_view_and_index( function test_static_directory_handler (line 90) | def test_static_directory_handler(app: Sanic, static_file_directory: str): function test_static_directory_handler_fails (line 112) | def test_static_directory_handler_fails(app: Sanic): function symlink_test_directory (line 131) | def symlink_test_directory(tmp_path): function test_directory_view_hides_symlinks_outside_root (line 161) | def test_directory_view_hides_symlinks_outside_root( function test_directory_view_broken_symlink_no_crash (line 176) | def test_directory_view_broken_symlink_no_crash( function test_symlink_inside_root_visible (line 185) | def test_symlink_inside_root_visible(app: Sanic, symlink_test_directory:... function test_symlink_to_outside_file_returns_404 (line 197) | def test_symlink_to_outside_file_returns_404( function test_symlink_to_outside_dir_returns_404 (line 206) | def test_symlink_to_outside_dir_returns_404( function test_symlink_serving_permutations (line 245) | def test_symlink_serving_permutations( function test_directory_view_visibility_permutations (line 299) | def test_directory_view_visibility_permutations( function test_static_index_with_cjk_directory_name (line 333) | def test_static_index_with_cjk_directory_name(app: Sanic, dir_name: str): FILE: tests/test_tasks.py function dummy (line 21) | async def dummy(n=0): function mark_app_running (line 28) | def mark_app_running(app: Sanic): function test_add_task_returns_task (line 36) | async def test_add_task_returns_task(app: Sanic): function test_add_task_with_name (line 43) | async def test_add_task_with_name(app: Sanic): function test_cancel_task (line 54) | async def test_cancel_task(app: Sanic): function test_purge_tasks (line 71) | async def test_purge_tasks(app: Sanic): function test_purge_tasks_with_create_task (line 83) | async def test_purge_tasks_with_create_task(app: Sanic): function test_shutdown_tasks_on_app_stop (line 95) | def test_shutdown_tasks_on_app_stop(): function test_task_result_is_preserved (line 113) | async def test_task_result_is_preserved(app: Sanic): function test_task_result_with_callable (line 126) | async def test_task_result_with_callable(app: Sanic): FILE: tests/test_test_client_port.py function test_test_client_port_none (line 11) | def test_test_client_port_none(app): function test_test_client_port_default (line 25) | def test_test_client_port_default(app): FILE: tests/test_timeout_logic.py function app (line 14) | def app(): function mock_transport (line 19) | def mock_transport(): function protocol (line 24) | def protocol(app, mock_transport): function test_setup (line 35) | def test_setup(protocol: HttpProtocol): function test_check_timeouts_no_timeout (line 41) | def test_check_timeouts_no_timeout(protocol: HttpProtocol): function test_check_timeouts_keep_alive_timeout (line 53) | def test_check_timeouts_keep_alive_timeout(protocol: HttpProtocol): function test_check_timeouts_request_timeout (line 61) | def test_check_timeouts_request_timeout(protocol: HttpProtocol): function test_check_timeouts_response_timeout (line 69) | def test_check_timeouts_response_timeout(protocol: HttpProtocol): FILE: tests/test_tls.py function server_cert (line 53) | def server_cert(): function issue_cert (line 58) | def issue_cert(server_cert): function ca (line 64) | def ca(issue_cert): function trustme (line 71) | def trustme(ca): function MockMkcertCreator (line 78) | def MockMkcertCreator(): function MockTrustmeCreator (line 92) | def MockTrustmeCreator(): function replace_server_name (line 106) | def replace_server_name(hostname): function test_url_attributes_with_ssl_context (line 140) | def test_url_attributes_with_ssl_context(app, path, query, expected_url): function test_url_attributes_with_ssl_dict (line 171) | def test_url_attributes_with_ssl_dict(app, path, query, expected_url): function test_cert_sni_single (line 193) | def test_cert_sni_single(app): function test_cert_sni_list (line 218) | def test_cert_sni_list(app): function test_missing_sni (line 279) | def test_missing_sni(app): function test_no_matching_cert (line 298) | def test_no_matching_cert(app): function test_wildcards (line 318) | def test_wildcards(app): function test_invalid_ssl_dict (line 351) | def test_invalid_ssl_dict(app): function test_invalid_ssl_type (line 364) | def test_invalid_ssl_type(app): function test_cert_file_on_pathlist (line 375) | def test_cert_file_on_pathlist(app): function test_missing_cert_path (line 389) | def test_missing_cert_path(app): function test_missing_cert_file (line 403) | def test_missing_cert_file(app): function test_no_certs_on_list (line 418) | def test_no_certs_on_list(app): function test_custom_cert_loader (line 431) | def test_custom_cert_loader(port): function test_logger_vhosts (line 454) | def test_logger_vhosts(caplog, port): function test_mk_cert_creator_default (line 482) | def test_mk_cert_creator_default(app: Sanic): function test_mk_cert_creator_is_supported (line 488) | def test_mk_cert_creator_is_supported(app): function test_mk_cert_creator_is_not_supported (line 500) | def test_mk_cert_creator_is_not_supported(app): function test_mk_cert_creator_generate_cert_default (line 510) | def test_mk_cert_creator_generate_cert_default(app): function test_mk_cert_creator_generate_cert_localhost (line 521) | def test_mk_cert_creator_generate_cert_localhost(app): function test_trustme_creator_default (line 529) | def test_trustme_creator_default(app: Sanic): function test_trustme_creator_is_supported (line 535) | def test_trustme_creator_is_supported(app, monkeypatch): function test_trustme_creator_is_not_supported (line 541) | def test_trustme_creator_is_not_supported(app, monkeypatch): function test_trustme_creator_generate_cert_default (line 550) | def test_trustme_creator_generate_cert_default( function test_trustme_creator_generate_cert_localhost (line 567) | def test_trustme_creator_generate_cert_localhost( function test_get_ssl_context_with_ssl_context (line 579) | def test_get_ssl_context_with_ssl_context(app): function test_get_ssl_context_in_production (line 585) | def test_get_ssl_context_in_production(app): function test_get_ssl_context_only_mkcert (line 618) | def test_get_ssl_context_only_mkcert( function test_sanic_ssl_context_create (line 677) | def test_sanic_ssl_context_create(): function test_ssl_in_multiprocess_mode (line 690) | def test_ssl_in_multiprocess_mode(app: Sanic, caplog): function test_ssl_in_multiprocess_mode_password (line 721) | def test_ssl_in_multiprocess_mode_password( FILE: tests/test_touchup.py function test_touchup_methods (line 11) | def test_touchup_methods(app): function test_ode_removes_dispatch_events (line 18) | async def test_ode_removes_dispatch_events(app, caplog, verbosity, result): function test_skip_touchup (line 36) | async def test_skip_touchup(app, caplog, skip_it, result): function test_skip_touchup_non_reserved (line 64) | async def test_skip_touchup_non_reserved(app, caplog, skip_it, result): FILE: tests/test_unix_socket.py function socket_cleanup (line 39) | def socket_cleanup(): function test_unix_socket_creation (line 63) | def test_unix_socket_creation(caplog: LogCaptureFixture): function test_invalid_paths (line 91) | def test_invalid_paths(path: str): function test_dont_replace_file (line 98) | def test_dont_replace_file(): function test_dont_follow_symlink (line 111) | def test_dont_follow_symlink(): function test_socket_deleted_while_running (line 128) | def test_socket_deleted_while_running(): function test_socket_replaced_with_file (line 139) | def test_socket_replaced_with_file(): function test_unix_connection (line 152) | def test_unix_connection(): function handler (line 176) | def handler(request: Request): function client (line 180) | async def client(app: Sanic, loop: AbstractEventLoop): function test_unix_connection_multiple_workers (line 196) | def test_unix_connection_multiple_workers(): FILE: tests/test_url_building.py function _generate_handlers_from_names (line 38) | def _generate_handlers_from_names(app, names): function simple_app (line 47) | def simple_app(app): function test_simple_url_for_getting (line 55) | def test_simple_url_for_getting(simple_app): function test_simple_url_for_getting_with_more_params (line 74) | def test_simple_url_for_getting_with_more_params(app, args, url): function test_url_for_with_server_name (line 85) | def test_url_for_with_server_name(app): function test_fails_if_endpoint_not_found (line 101) | def test_fails_if_endpoint_not_found(): function test_fails_url_build_if_param_not_passed (line 113) | def test_fails_url_build_if_param_not_passed(app): function test_fails_url_build_if_params_not_passed (line 133) | def test_fails_url_build_if_params_not_passed(app): function test_fails_with_int_message (line 157) | def test_fails_with_int_message(app): function test_passes_with_negative_int_message (line 175) | def test_passes_with_negative_int_message(app): function test_fails_with_two_letter_string_message (line 191) | def test_fails_with_two_letter_string_message(app): function test_fails_with_number_message (line 207) | def test_fails_with_number_message(app): function test_passes_with_negative_number_message (line 225) | def test_passes_with_negative_number_message(app, number): function test_adds_other_supplied_values_as_query_string (line 238) | def test_adds_other_supplied_values_as_query_string(app): function blueprint_app (line 256) | def blueprint_app(): function test_blueprints_are_named_correctly (line 284) | def test_blueprints_are_named_correctly(blueprint_app): function test_blueprints_work_with_params (line 292) | def test_blueprints_work_with_params(blueprint_app): function methodview_app (line 301) | def methodview_app(app): function test_methodview_naming (line 341) | def test_methodview_naming(methodview_app): function test_versioning (line 360) | def test_versioning(app, path, version, expected): FILE: tests/test_url_for.py function test_routes_with_host (line 10) | def test_routes_with_host(app): function test_routes_with_multiple_hosts (line 25) | def test_routes_with_multiple_hosts(app): function test_websocket_bp_route_name (line 54) | def test_websocket_bp_route_name(app, name, expected): function test_trailing_slash_url_for (line 97) | def test_trailing_slash_url_for(app, path, strict, expected): FILE: tests/test_url_for_static.py function static_file_directory (line 14) | def static_file_directory(): function get_file_path (line 22) | def get_file_path(static_file_directory, file_name): function get_file_content (line 26) | def get_file_content(static_file_directory, file_name): function test_static_file (line 40) | def test_static_file(static_file_directory, file_name): function test_static_directory (line 126) | def test_static_directory(file_name, base_uri, static_file_directory): function test_static_head_request (line 187) | def test_static_head_request(file_name, static_file_directory): function test_static_content_range_correct (line 233) | def test_static_content_range_correct(file_name, static_file_directory): function test_static_content_range_front (line 285) | def test_static_content_range_front(file_name, static_file_directory): function test_static_content_range_back (line 338) | def test_static_content_range_back(file_name, static_file_directory): function test_static_content_range_empty (line 391) | def test_static_content_range_empty(file_name, static_file_directory): function test_static_content_range_error (line 445) | def test_static_content_range_error(app, file_name, static_file_directory): FILE: tests/test_utf8.py function test_utf8_query_string (line 11) | def test_utf8_query_string(app): function test_utf8_response (line 20) | def test_utf8_response(app): function skip_test_utf8_route (line 29) | def skip_test_utf8_route(app): function test_utf8_post_json (line 39) | def test_utf8_post_json(app): FILE: tests/test_utils.py function test_load_module_from_file_location (line 19) | def test_load_module_from_file_location(location): function test_loaded_module_from_file_location_name (line 25) | def test_loaded_module_from_file_location_name(): function test_load_module_from_file_location_with_non_existing_env_variable (line 36) | def test_load_module_from_file_location_with_non_existing_env_variable(): function test_load_module_from_file_location_using_env (line 44) | def test_load_module_from_file_location_using_env(): FILE: tests/test_versioning.py function handler (line 7) | def handler(): function test_route (line 14) | def test_route(app, handler): function test_bp (line 21) | def test_bp(app, handler): function test_bp_use_route (line 30) | def test_bp_use_route(app, handler): function test_bp_group (line 39) | def test_bp_group(app, handler): function test_bp_group_use_bp (line 49) | def test_bp_group_use_bp(app, handler): function test_bp_group_use_registration (line 59) | def test_bp_group_use_registration(app, handler): function test_bp_group_use_route (line 69) | def test_bp_group_use_route(app, handler): function test_version_prefix_route (line 79) | def test_version_prefix_route(app, handler): function test_version_prefix_bp (line 86) | def test_version_prefix_bp(app, handler): function test_version_prefix_bp_use_route (line 95) | def test_version_prefix_bp_use_route(app, handler): function test_version_prefix_bp_group (line 104) | def test_version_prefix_bp_group(app, handler): function test_version_prefix_bp_group_use_bp (line 114) | def test_version_prefix_bp_group_use_bp(app, handler): function test_version_prefix_bp_group_use_registration (line 124) | def test_version_prefix_bp_group_use_registration(app, handler): function test_version_prefix_bp_group_use_route (line 134) | def test_version_prefix_bp_group_use_route(app, handler): FILE: tests/test_vhosts.py function test_vhosts (line 9) | def test_vhosts(): function test_vhosts_with_list (line 29) | def test_vhosts_with_list(app): function test_vhosts_with_defaults (line 43) | def test_vhosts_with_defaults(app): FILE: tests/test_views.py function test_methods (line 11) | def test_methods(app, method): function test_unexisting_methods (line 40) | def test_unexisting_methods(app): function test_argument_methods (line 52) | def test_argument_methods(app): function test_with_bp (line 64) | def test_with_bp(app): function test_with_attach (line 79) | def test_with_attach(app): function test_with_sub_init (line 91) | def test_with_sub_init(app): function test_with_attach_and_bp (line 101) | def test_with_attach_and_bp(app): function test_with_sub_init_and_bp (line 116) | def test_with_sub_init_and_bp(app): function test_with_bp_with_url_prefix (line 129) | def test_with_bp_with_url_prefix(app): function test_with_middleware (line 144) | def test_with_middleware(app): function test_with_middleware_response (line 163) | def test_with_middleware_response(app): function test_with_custom_class_methods (line 189) | def test_with_custom_class_methods(app): function test_with_decorator (line 205) | def test_with_decorator(app): FILE: tests/test_websockets.py function test_ws_frame_get_message_incomplete_timeout_0 (line 21) | async def test_ws_frame_get_message_incomplete_timeout_0(): function test_ws_frame_get_message_in_progress (line 32) | async def test_ws_frame_get_message_in_progress(): function test_ws_frame_get_message_incomplete (line 46) | async def test_ws_frame_get_message_incomplete(): function test_ws_frame_get_message (line 57) | async def test_ws_frame_get_message(): function test_ws_frame_get_message_with_timeout (line 68) | async def test_ws_frame_get_message_with_timeout(): function test_ws_frame_get_message_with_timeouterror (line 80) | async def test_ws_frame_get_message_with_timeouterror(): function test_ws_frame_get_not_completed (line 93) | async def test_ws_frame_get_not_completed(): function test_ws_frame_get_not_completed_start (line 103) | async def test_ws_frame_get_not_completed_start(): function test_ws_frame_get_paused (line 113) | async def test_ws_frame_get_paused(): function test_ws_frame_get_data (line 125) | async def test_ws_frame_get_data(): function test_ws_frame_get_iter_in_progress (line 136) | async def test_ws_frame_get_iter_in_progress(): function test_ws_frame_get_iter_none_in_queue (line 150) | async def test_ws_frame_get_iter_none_in_queue(): function test_ws_frame_get_iter_paused (line 161) | async def test_ws_frame_get_iter_paused(): function test_ws_frame_put_not_fetched (line 172) | async def test_ws_frame_put_not_fetched(opcode): function test_ws_frame_put_fetched (line 186) | async def test_ws_frame_put_fetched(opcode): function test_ws_frame_put_message_complete (line 198) | async def test_ws_frame_put_message_complete(opcode): function test_ws_frame_put_message_into_queue (line 212) | async def test_ws_frame_put_message_into_queue(opcode): function test_ws_frame_put_not_fin (line 225) | async def test_ws_frame_put_not_fin(opcode): function test_ws_frame_put_skip_ctrl (line 235) | async def test_ws_frame_put_skip_ctrl(opcode): FILE: tests/test_ws_handlers.py function simple_ws_mimic_client (line 20) | def simple_ws_mimic_client(): function signalapp (line 30) | def signalapp(app): function test_ws_handler (line 64) | def test_ws_handler( function test_ws_handler_invalid_upgrade (line 81) | def test_ws_handler_invalid_upgrade(app: Sanic): function test_ws_handler_async_for (line 98) | def test_ws_handler_async_for( function test_request_url (line 115) | def test_request_url( function test_ws_signals (line 150) | def test_ws_signals( function test_ws_signals_exception (line 164) | def test_ws_signals_exception( FILE: tests/typing/samples/app_custom_config.py class CustomConfig (line 5) | class CustomConfig(Config): FILE: tests/typing/samples/app_custom_ctx.py class Foo (line 4) | class Foo: FILE: tests/typing/samples/app_fully_custom.py class CustomConfig (line 5) | class CustomConfig(Config): class Foo (line 9) | class Foo: FILE: tests/typing/samples/request_custom_ctx.py class Foo (line 7) | class Foo: function handler (line 15) | async def handler(request: Request[Sanic[Config, SimpleNamespace], Foo]): FILE: tests/typing/samples/request_custom_sanic.py class CustomConfig (line 7) | class CustomConfig(Config): function handler (line 15) | async def handler( FILE: tests/typing/samples/request_fully_custom.py class CustomConfig (line 5) | class CustomConfig(Config): class Foo (line 9) | class Foo: class RequestContext (line 13) | class RequestContext: class CustomRequest (line 17) | class CustomRequest(Request[Sanic[CustomConfig, Foo], RequestContext]): method make_context (line 19) | def make_context() -> RequestContext: function handler (line 31) | async def handler(request: CustomRequest): FILE: tests/typing/test_typing.py function run_check (line 13) | def run_check(path_location: str) -> str: function test_check_app_default (line 96) | def test_check_app_default( function _text_from_path (line 118) | def _text_from_path( FILE: tests/worker/conftest.py function pytest_collection_modifyitems (line 4) | def pytest_collection_modifyitems(items): FILE: tests/worker/test_inspector.py class FooInspector (line 33) | class FooInspector(Inspector): method foo (line 34) | async def foo(self, bar): function publisher (line 39) | def publisher(): function inspector (line 45) | def inspector(publisher): function http_client (line 54) | def http_client(inspector): function test_send_inspect (line 61) | def test_send_inspect(write, urlopen, command: str): function test_send_inspect_conn_refused (line 71) | def test_send_inspect_conn_refused(sys: Mock, urlopen): function test_run_inspector_reload (line 85) | def test_run_inspector_reload(publisher, http_client): function test_run_inspector_reload_zero_downtime (line 91) | def test_run_inspector_reload_zero_downtime(publisher, http_client): function test_run_inspector_shutdown (line 97) | def test_run_inspector_shutdown(publisher, http_client): function test_run_inspector_scale (line 103) | def test_run_inspector_scale(publisher, http_client): function test_run_inspector_arbitrary (line 109) | def test_run_inspector_arbitrary(http_client): function test_state_to_json (line 115) | def test_state_to_json(): function test_run_inspector_authentication (line 131) | def test_run_inspector_authentication(): FILE: tests/worker/test_loader.py function test_load_app_instance (line 20) | def test_load_app_instance(module_input): function test_load_app_factory (line 30) | def test_load_app_factory(module_input): function test_load_app_simple (line 36) | def test_load_app_simple(): function test_create_with_factory (line 42) | def test_create_with_factory(): function test_cwd_in_path (line 48) | def test_cwd_in_path(): function test_input_is_dir (line 53) | def test_input_is_dir(): function test_input_is_factory (line 59) | def test_input_is_factory(): function test_input_is_module (line 66) | def test_input_is_module(): function test_cert_loader (line 77) | def test_cert_loader(MkcertCreator: Mock, TrustmeCreator: Mock, creator:... FILE: tests/worker/test_manager.py function fake_serve (line 20) | def fake_serve(): ... function manager (line 24) | def manager() -> WorkerManager: function test_manager_no_workers (line 34) | def test_manager_no_workers(): function test_terminate (line 41) | def test_terminate(os_mock: Mock): function test_shutown (line 52) | def test_shutown(os_mock: Mock): function test_kill (line 64) | def test_kill(os_mock: Mock): function test_shutdown_signal_send_kill (line 79) | def test_shutdown_signal_send_kill( function test_restart_all (line 97) | def test_restart_all(): function test_monitor_all (line 138) | def test_monitor_all(zero_downtime): function test_monitor_all_with_files (line 168) | def test_monitor_all_with_files(zero_downtime): function test_monitor_one_process (line 198) | def test_monitor_one_process(zero_downtime): function test_shutdown_signal (line 228) | def test_shutdown_signal(): function test_shutdown_servers (line 238) | def test_shutdown_servers(caplog): function test_shutdown_servers_named (line 270) | def test_shutdown_servers_named(): function test_scale (line 288) | def test_scale(caplog): function test_manage_basic (line 327) | def test_manage_basic(manager: WorkerManager): function test_manage_transient (line 344) | def test_manage_transient(manager: WorkerManager): function test_manage_restartable (line 360) | def test_manage_restartable(manager: WorkerManager): function test_manage_untracked (line 379) | def test_manage_untracked(manager: WorkerManager): function test_manage_duplicate_ident (line 392) | def test_manage_duplicate_ident(manager: WorkerManager): function test_transient_not_restartable (line 399) | def test_transient_not_restartable(manager: WorkerManager): function test_remove_worker (line 411) | def test_remove_worker(manager: WorkerManager, caplog): function test_remove_untracked_worker (line 427) | def test_remove_untracked_worker(manager: WorkerManager, caplog): FILE: tests/worker/test_multiplexer.py function noop (line 16) | def noop(*args, **kwargs): function monitor_publisher (line 21) | def monitor_publisher(): function worker_state (line 26) | def worker_state(): function m (line 31) | def m(monitor_publisher, worker_state): function test_has_multiplexer_default (line 42) | def test_has_multiplexer_default(app: Sanic): function test_not_have_multiplexer_single (line 61) | def test_not_have_multiplexer_single(app: Sanic): function test_ack (line 79) | def test_ack(worker_state: dict[str, Any], m: WorkerMultiplexer): function test_restart_self (line 85) | def test_restart_self(monitor_publisher: Mock, m: WorkerMultiplexer): function test_restart_foo (line 90) | def test_restart_foo(monitor_publisher: Mock, m: WorkerMultiplexer): function test_reload_alias (line 95) | def test_reload_alias(monitor_publisher: Mock, m: WorkerMultiplexer): function test_terminate (line 100) | def test_terminate(monitor_publisher: Mock, m: WorkerMultiplexer): function test_scale (line 105) | def test_scale(monitor_publisher: Mock, m: WorkerMultiplexer): function test_manage (line 110) | def test_manage(monitor_publisher: Mock, m: WorkerMultiplexer): function test_properties (line 117) | def test_properties( function test_restart_params (line 147) | def test_restart_params( FILE: tests/worker/test_reloader.py function reloader (line 21) | def reloader(): ... function app (line 25) | def app(): function app_loader (line 35) | def app_loader(app): function run_reloader (line 39) | def run_reloader(reloader): function is_python_file (line 48) | def is_python_file(filename): function test_reload_send (line 54) | def test_reload_send(): function test_iter_files (line 61) | def test_iter_files(): function test_default_reload_shutdown_order (line 97) | def test_default_reload_shutdown_order(monkeypatch, caplog, order, expec... function test_reload_delayed (line 131) | def test_reload_delayed(monkeypatch): function test_reloader_triggers_start_stop_listeners (line 158) | def test_reloader_triggers_start_stop_listeners( function test_not_triggered (line 177) | def test_not_triggered(app_loader): function test_triggered (line 186) | def test_triggered(app_loader): function test_reloader_triggers_reload_listeners (line 213) | def test_reloader_triggers_reload_listeners(app: Sanic, app_loader: AppL... function test_check_file (line 240) | def test_check_file(tmp_path): FILE: tests/worker/test_restarter.py function noop (line 10) | def noop(*args, **kwargs): function make_worker_process (line 14) | def make_worker_process( function test_restart_transient (line 24) | def test_restart_transient(): function test_restart_durable (line 58) | def test_restart_durable(caplog, state, called): FILE: tests/worker/test_runner.py function test_run_http_1 (line 11) | def test_run_http_1(_serve_http_3: Mock, _serve_http_1: Mock, app: Sanic): function test_run_http_3 (line 19) | def test_run_http_3(_serve_http_3: Mock, _serve_http_1: Mock, app: Sanic): function test_run_server_forever (line 27) | def test_run_server_forever(remove_unix_socket: Mock, do_cleanup: bool): FILE: tests/worker/test_shared_ctx.py function test_set_items (line 33) | def test_set_items(item: Any, okay: bool, caplog): function test_set_items_in_worker (line 59) | def test_set_items_in_worker(item: Any, caplog): function test_lock (line 71) | def test_lock(): FILE: tests/worker/test_socket.py function test_setup_and_teardown_unix (line 10) | def test_setup_and_teardown_unix(): function test_configure_socket (line 20) | def test_configure_socket(): FILE: tests/worker/test_startup.py function test_get_context (line 24) | def test_get_context(start_method, platform, expected): function test_set_startup_catch (line 34) | def test_set_startup_catch(): FILE: tests/worker/test_state.py function gen_state (line 6) | def gen_state(**kwargs): function test_set_get_state (line 10) | def test_set_get_state(): function test_del_state (line 18) | def test_del_state(): function test_iter_state (line 25) | def test_iter_state(): function test_state_len (line 30) | def test_state_len(): function test_state_repr (line 35) | def test_state_repr(): function test_state_eq (line 39) | def test_state_eq(): function test_state_keys (line 45) | def test_state_keys(): function test_state_values (line 51) | def test_state_values(): function test_state_items (line 57) | def test_state_items(): function test_state_update (line 63) | def test_state_update(): function test_state_pop (line 71) | def test_state_pop(): function test_state_full (line 77) | def test_state_full(): function test_state_restricted_operation (line 83) | def test_state_restricted_operation(key): FILE: tests/worker/test_worker_serve.py function mock_app (line 16) | def mock_app(): function args (line 27) | def args(app, **kwargs): function test_config_app (line 37) | def test_config_app(mock_app: Mock): function test_bad_process (line 43) | def test_bad_process(mock_app: Mock, caplog): function test_has_multiplexer (line 63) | def test_has_multiplexer(app: Sanic): function test_serve_app_implicit (line 79) | def test_serve_app_implicit(wm: Mock, app): function test_serve_app_explicit (line 86) | def test_serve_app_explicit(wm: Mock, mock_app): function test_serve_app_loader (line 92) | def test_serve_app_loader(wm: Mock, mock_app): function test_serve_app_factory (line 99) | def test_serve_app_factory(wm: Mock, mock_app): function test_serve_with_inspector (line 106) | def test_serve_with_inspector(