mirror of
https://github.com/davidhalter/django-stubs.git
synced 2026-10-25 23:27:38 +08:00
merge with stubgen output
This commit is contained in:
1 parent
496a6274e7
commit
4866354600
294 files changed
+10234
-10842
No files matched your search
+39
-38
@@ -1,51 +1,52 @@
|
||||
from typing import (
|
||||
List,
|
||||
Optional,
|
||||
Tuple,
|
||||
Union,
|
||||
)
|
||||
# Stubs for django.test.html (Python 3.6)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from html.parser import HTMLParser
|
||||
from typing import Any, Optional
|
||||
|
||||
from typing import List, Optional, Tuple, Union
|
||||
WHITESPACE: Any
|
||||
|
||||
def normalize_whitespace(string: str) -> str: ...
|
||||
|
||||
|
||||
def parse_html(html: str) -> Element: ...
|
||||
|
||||
|
||||
class Element:
|
||||
def __contains__(self, element: Element) -> bool: ...
|
||||
def __eq__(self, element: Union[str, Element]) -> bool: ...
|
||||
def __getitem__(self, key: int) -> Union[str, Element]: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __init__(
|
||||
self,
|
||||
name: Optional[str],
|
||||
attributes: Union[Tuple, List[Union[Tuple[str, str], Tuple[str, None]]], List[Tuple[str, None]], List[Tuple[str, str]]]
|
||||
) -> None: ...
|
||||
def __repr__(self) -> str: ...
|
||||
def __str__(self) -> str: ...
|
||||
def _count(self, element: Union[str, Element], count: bool = ...) -> int: ...
|
||||
name: Any = ...
|
||||
attributes: Any = ...
|
||||
children: Any = ...
|
||||
def __init__(self, name: Optional[str], attributes: Union[Tuple, List[Union[Tuple[str, str], Tuple[str, None]]], List[Tuple[str, None]], List[Tuple[str, str]]]) -> None: ...
|
||||
def append(self, element: Union[str, Element]) -> None: ...
|
||||
def count(self, element: Element) -> int: ...
|
||||
def finalize(self) -> None: ...
|
||||
def __eq__(self, element: Union[str, Element]) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def _count(self, element: Union[str, Element], count: bool = ...) -> int: ...
|
||||
def __contains__(self, element: Element) -> bool: ...
|
||||
def count(self, element: Element) -> int: ...
|
||||
def __getitem__(self, key: int) -> Union[str, Element]: ...
|
||||
def __str__(self) -> str: ...
|
||||
def __repr__(self) -> str: ...
|
||||
|
||||
|
||||
class Parser:
|
||||
class RootElement(Element):
|
||||
def __init__(self) -> None: ...
|
||||
def __str__(self) -> str: ...
|
||||
|
||||
class HTMLParseError(Exception): ...
|
||||
|
||||
class Parser(HTMLParser):
|
||||
SELF_CLOSING_TAGS: Any = ...
|
||||
root: Any = ...
|
||||
open_tags: Any = ...
|
||||
element_positions: Any = ...
|
||||
def __init__(self) -> None: ...
|
||||
def error(self, msg: Any) -> None: ...
|
||||
def format_position(self, position: Optional[Any] = ..., element: Optional[Any] = ...): ...
|
||||
@property
|
||||
def current(self) -> Element: ...
|
||||
def handle_charref(self, name: str) -> None: ...
|
||||
def handle_data(self, data: str) -> None: ...
|
||||
def handle_endtag(self, tag: str) -> None: ...
|
||||
def handle_entityref(self, name: str) -> None: ...
|
||||
def handle_startendtag(self, tag: str, attrs: List[Tuple[str, str]]) -> None: ...
|
||||
def handle_starttag(
|
||||
self,
|
||||
tag: str,
|
||||
attrs: Union[List[Union[Tuple[str, str], Tuple[str, None]]], List[Tuple[str, str]]]
|
||||
) -> None: ...
|
||||
def handle_starttag(self, tag: str, attrs: Union[List[Union[Tuple[str, str], Tuple[str, None]]], List[Tuple[str, str]]]) -> None: ...
|
||||
def handle_endtag(self, tag: str) -> None: ...
|
||||
def handle_data(self, data: str) -> None: ...
|
||||
def handle_charref(self, name: str) -> None: ...
|
||||
def handle_entityref(self, name: str) -> None: ...
|
||||
|
||||
|
||||
class RootElement:
|
||||
def __init__(self) -> None: ...
|
||||
def __str__(self) -> str: ...
|
||||
def parse_html(html: str) -> Element: ...
|
||||
@@ -1,101 +1,114 @@
|
||||
# Stubs for django.test.runner (Python 3.6)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
import unittest
|
||||
from typing import Any, Optional
|
||||
|
||||
from django.db.backends.dummy.base import DatabaseWrapper
|
||||
from django.db.backends.sqlite3.base import DatabaseWrapper
|
||||
from django.test.testcases import (
|
||||
SimpleTestCase,
|
||||
TestCase,
|
||||
)
|
||||
from django.test.testcases import SimpleTestCase, TestCase
|
||||
from django.utils.datastructures import OrderedSet
|
||||
from typing import (
|
||||
Any,
|
||||
Dict,
|
||||
List,
|
||||
Optional,
|
||||
Set,
|
||||
Tuple,
|
||||
Type,
|
||||
Union,
|
||||
)
|
||||
from typing import Any, Dict, List, Optional, Set, Tuple, Type, Union
|
||||
from unittest.case import _SubTest
|
||||
from unittest.runner import TextTestResult
|
||||
from unittest.suite import TestSuite
|
||||
class DebugSQLTextTestResult(unittest.TextTestResult):
|
||||
logger: Any = ...
|
||||
def __init__(self, stream: Any, descriptions: Any, verbosity: Any) -> None: ...
|
||||
debug_sql_stream: Any = ...
|
||||
handler: Any = ...
|
||||
def startTest(self, test: TestCase) -> None: ...
|
||||
def stopTest(self, test: TestCase) -> None: ...
|
||||
def addError(self, test: Any, err: Any) -> None: ...
|
||||
def addFailure(self, test: Any, err: Any) -> None: ...
|
||||
def addSubTest(self, test: TestCase, subtest: _SubTest, err: None) -> None: ...
|
||||
def printErrorList(self, flavour: str, errors: List[Union[Tuple[TestCase, str, str], Tuple[_SubTest, str, str]]]) -> None: ...
|
||||
|
||||
class RemoteTestResult:
|
||||
events: Any = ...
|
||||
failfast: bool = ...
|
||||
shouldStop: bool = ...
|
||||
testsRun: int = ...
|
||||
def __init__(self) -> None: ...
|
||||
@property
|
||||
def test_index(self): ...
|
||||
def _confirm_picklable(self, obj: Any) -> None: ...
|
||||
def _print_unpicklable_subtest(self, test: Any, subtest: Any, pickle_exc: Any) -> None: ...
|
||||
def check_picklable(self, test: Any, err: Any) -> None: ...
|
||||
def check_subtest_picklable(self, test: Any, subtest: Any) -> None: ...
|
||||
def stop_if_failfast(self) -> None: ...
|
||||
def stop(self) -> None: ...
|
||||
def startTestRun(self) -> None: ...
|
||||
def stopTestRun(self) -> None: ...
|
||||
def startTest(self, test: Any) -> None: ...
|
||||
def stopTest(self, test: Any) -> None: ...
|
||||
def addError(self, test: Any, err: Any) -> None: ...
|
||||
def addFailure(self, test: Any, err: Any) -> None: ...
|
||||
def addSubTest(self, test: Any, subtest: Any, err: Any) -> None: ...
|
||||
def addSuccess(self, test: Any) -> None: ...
|
||||
def addSkip(self, test: Any, reason: Any) -> None: ...
|
||||
def addExpectedFailure(self, test: Any, err: Any) -> None: ...
|
||||
def addUnexpectedSuccess(self, test: Any) -> None: ...
|
||||
|
||||
class RemoteTestRunner:
|
||||
resultclass: Any = ...
|
||||
failfast: Any = ...
|
||||
def __init__(self, failfast: bool = ..., resultclass: Optional[Any] = ...) -> None: ...
|
||||
def run(self, test: Any): ...
|
||||
|
||||
def default_test_processes() -> int: ...
|
||||
|
||||
_worker_id: int
|
||||
|
||||
def filter_tests_by_tags(
|
||||
suite: TestSuite,
|
||||
tags: Set[str],
|
||||
exclude_tags: Set[str]
|
||||
) -> TestSuite: ...
|
||||
|
||||
|
||||
def is_discoverable(label: str) -> bool: ...
|
||||
|
||||
|
||||
def partition_suite_by_type(
|
||||
suite: TestSuite,
|
||||
classes: Tuple[Type[TestCase], Type[SimpleTestCase]],
|
||||
bins: List[OrderedSet],
|
||||
reverse: bool = ...
|
||||
) -> None: ...
|
||||
|
||||
|
||||
def reorder_suite(
|
||||
suite: TestSuite,
|
||||
classes: Tuple[Type[TestCase], Type[SimpleTestCase]],
|
||||
reverse: bool = ...
|
||||
) -> TestSuite: ...
|
||||
|
||||
|
||||
class DebugSQLTextTestResult:
|
||||
def addSubTest(self, test: TestCase, subtest: _SubTest, err: None) -> None: ...
|
||||
def printErrorList(
|
||||
self,
|
||||
flavour: str,
|
||||
errors: List[Union[Tuple[TestCase, str, str], Tuple[_SubTest, str, str]]]
|
||||
) -> None: ...
|
||||
def startTest(self, test: TestCase) -> None: ...
|
||||
def stopTest(self, test: TestCase) -> None: ...
|
||||
def _init_worker(counter: Any) -> None: ...
|
||||
def _run_subsuite(args: Any): ...
|
||||
|
||||
class ParallelTestSuite(unittest.TestSuite):
|
||||
init_worker: Any = ...
|
||||
run_subsuite: Any = ...
|
||||
runner_class: Any = ...
|
||||
subsuites: Any = ...
|
||||
processes: Any = ...
|
||||
failfast: Any = ...
|
||||
def __init__(self, suite: Any, processes: Any, failfast: bool = ...) -> None: ...
|
||||
def run(self, result: Any): ...
|
||||
|
||||
class DiscoverRunner:
|
||||
def __init__(
|
||||
self,
|
||||
pattern: None = ...,
|
||||
top_level: None = ...,
|
||||
verbosity: int = ...,
|
||||
interactive: bool = ...,
|
||||
failfast: bool = ...,
|
||||
keepdb: bool = ...,
|
||||
reverse: bool = ...,
|
||||
debug_mode: bool = ...,
|
||||
debug_sql: bool = ...,
|
||||
parallel: int = ...,
|
||||
tags: Optional[List[str]] = ...,
|
||||
exclude_tags: None = ...,
|
||||
**kwargs
|
||||
) -> None: ...
|
||||
def build_suite(
|
||||
self,
|
||||
test_labels: Union[Tuple[str, str], List[str], Tuple[str]] = ...,
|
||||
extra_tests: None = ...,
|
||||
**kwargs
|
||||
) -> TestSuite: ...
|
||||
test_suite: Any = ...
|
||||
parallel_test_suite: Any = ...
|
||||
test_runner: Any = ...
|
||||
test_loader: Any = ...
|
||||
reorder_by: Any = ...
|
||||
pattern: Any = ...
|
||||
top_level: Any = ...
|
||||
verbosity: Any = ...
|
||||
interactive: Any = ...
|
||||
failfast: Any = ...
|
||||
keepdb: Any = ...
|
||||
reverse: Any = ...
|
||||
debug_mode: Any = ...
|
||||
debug_sql: Any = ...
|
||||
parallel: Any = ...
|
||||
tags: Any = ...
|
||||
exclude_tags: Any = ...
|
||||
def __init__(self, pattern: None = ..., top_level: None = ..., verbosity: int = ..., interactive: bool = ..., failfast: bool = ..., keepdb: bool = ..., reverse: bool = ..., debug_mode: bool = ..., debug_sql: bool = ..., parallel: int = ..., tags: Optional[List[str]] = ..., exclude_tags: None = ..., **kwargs: Any) -> None: ...
|
||||
@classmethod
|
||||
def add_arguments(cls, parser: Any) -> None: ...
|
||||
def setup_test_environment(self, **kwargs: Any) -> None: ...
|
||||
def build_suite(self, test_labels: Union[Tuple[str, str], List[str], Tuple[str]] = ..., extra_tests: None = ..., **kwargs: Any) -> TestSuite: ...
|
||||
def setup_databases(self, **kwargs: Any) -> Union[List[Tuple[DatabaseWrapper, str, bool]], List[Tuple[DatabaseWrapper, str, bool]]]: ...
|
||||
def get_resultclass(self) -> None: ...
|
||||
def get_test_runner_kwargs(self) -> Dict[str, Optional[int]]: ...
|
||||
def run_checks(self) -> None: ...
|
||||
def run_suite(self, suite: TestSuite, **kwargs) -> TextTestResult: ...
|
||||
def run_tests(self, test_labels: List[str], extra_tests: List[Any] = ..., **kwargs) -> int: ...
|
||||
def setup_databases(
|
||||
self,
|
||||
**kwargs
|
||||
) -> Union[List[Tuple[DatabaseWrapper, str, bool]], List[Tuple[DatabaseWrapper, str, bool]]]: ...
|
||||
def setup_test_environment(self, **kwargs) -> None: ...
|
||||
def suite_result(self, suite: TestSuite, result: TextTestResult, **kwargs) -> int: ...
|
||||
def teardown_databases(
|
||||
self,
|
||||
old_config: Union[List[Tuple[DatabaseWrapper, str, bool]], List[Tuple[DatabaseWrapper, str, bool]]],
|
||||
**kwargs
|
||||
) -> None: ...
|
||||
def teardown_test_environment(self, **kwargs) -> None: ...
|
||||
def run_suite(self, suite: TestSuite, **kwargs: Any) -> TextTestResult: ...
|
||||
def teardown_databases(self, old_config: Union[List[Tuple[DatabaseWrapper, str, bool]], List[Tuple[DatabaseWrapper, str, bool]]], **kwargs: Any) -> None: ...
|
||||
def teardown_test_environment(self, **kwargs: Any) -> None: ...
|
||||
def suite_result(self, suite: TestSuite, result: TextTestResult, **kwargs: Any) -> int: ...
|
||||
def run_tests(self, test_labels: List[str], extra_tests: List[Any] = ..., **kwargs: Any) -> int: ...
|
||||
|
||||
def is_discoverable(label: str) -> bool: ...
|
||||
def reorder_suite(suite: TestSuite, classes: Tuple[Type[TestCase], Type[SimpleTestCase]], reverse: bool = ...) -> TestSuite: ...
|
||||
def partition_suite_by_type(suite: TestSuite, classes: Tuple[Type[TestCase], Type[SimpleTestCase]], bins: List[OrderedSet], reverse: bool = ...) -> None: ...
|
||||
def partition_suite_by_case(suite: Any): ...
|
||||
def filter_tests_by_tags(suite: TestSuite, tags: Set[str], exclude_tags: Set[str]) -> TestSuite: ...
|
||||
@@ -1,20 +1,25 @@
|
||||
# Stubs for django.test.selenium (Python 3.6)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from django.test import LiveServerTestCase
|
||||
from typing import Any
|
||||
|
||||
from django.contrib.admin.tests import AdminSeleniumTestCase
|
||||
from django.contrib.staticfiles.testing import StaticLiveServerTestCase
|
||||
from typing import (
|
||||
Callable,
|
||||
Dict,
|
||||
List,
|
||||
Tuple,
|
||||
Type,
|
||||
Union,
|
||||
)
|
||||
|
||||
|
||||
from typing import Callable, Dict, List, Tuple, Type, Union
|
||||
class SeleniumTestCaseBase:
|
||||
@staticmethod
|
||||
def __new__(
|
||||
cls: Type[SeleniumTestCaseBase],
|
||||
name: str,
|
||||
bases: Union[Tuple[Type[AdminSeleniumTestCase]], Tuple[Type[SeleniumTestCase], Type[StaticLiveServerTestCase]]],
|
||||
attrs: Dict[str, Union[str, List[str], Callable]]
|
||||
) -> Type[AdminSeleniumTestCase]: ...
|
||||
browsers: Any = ...
|
||||
browser: Any = ...
|
||||
def __new__(cls: Type[SeleniumTestCaseBase], name: str, bases: Union[Tuple[Type[AdminSeleniumTestCase]], Tuple[Type[SeleniumTestCase], Type[StaticLiveServerTestCase]]], attrs: Dict[str, Union[str, List[str], Callable]]) -> Type[AdminSeleniumTestCase]: ...
|
||||
@classmethod
|
||||
def import_webdriver(cls, browser: Any): ...
|
||||
def create_webdriver(self): ...
|
||||
|
||||
class SeleniumTestCase(LiveServerTestCase):
|
||||
implicit_wait: int = ...
|
||||
@classmethod
|
||||
def setUpClass(cls) -> None: ...
|
||||
@classmethod
|
||||
def _tearDownClassInternal(cls) -> None: ...
|
||||
def disable_implicit_wait(self) -> None: ...
|
||||
@@ -1,43 +1,24 @@
|
||||
def auth_password_validators_changed(**kwargs) -> None: ...
|
||||
# Stubs for django.test.signals (Python 3.6)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
|
||||
def clear_cache_handlers(**kwargs) -> None: ...
|
||||
template_rendered: Any
|
||||
COMPLEX_OVERRIDE_SETTINGS: Any
|
||||
|
||||
|
||||
def clear_routers_cache(**kwargs) -> None: ...
|
||||
|
||||
|
||||
def clear_serializers_cache(**kwargs) -> None: ...
|
||||
|
||||
|
||||
def complex_setting_changed(**kwargs) -> None: ...
|
||||
|
||||
|
||||
def file_storage_changed(**kwargs) -> None: ...
|
||||
|
||||
|
||||
def language_changed(**kwargs) -> None: ...
|
||||
|
||||
|
||||
def localize_settings_changed(**kwargs) -> None: ...
|
||||
|
||||
|
||||
def reset_template_engines(**kwargs) -> None: ...
|
||||
|
||||
|
||||
def root_urlconf_changed(**kwargs) -> None: ...
|
||||
|
||||
|
||||
def static_finders_changed(**kwargs) -> None: ...
|
||||
|
||||
|
||||
def static_storage_changed(**kwargs) -> None: ...
|
||||
|
||||
|
||||
def update_connections_time_zone(**kwargs) -> None: ...
|
||||
|
||||
|
||||
def update_installed_apps(**kwargs) -> None: ...
|
||||
|
||||
|
||||
def user_model_swapped(**kwargs) -> None: ...
|
||||
def clear_cache_handlers(**kwargs: Any) -> None: ...
|
||||
def update_installed_apps(**kwargs: Any) -> None: ...
|
||||
def update_connections_time_zone(**kwargs: Any) -> None: ...
|
||||
def clear_routers_cache(**kwargs: Any) -> None: ...
|
||||
def reset_template_engines(**kwargs: Any) -> None: ...
|
||||
def clear_serializers_cache(**kwargs: Any) -> None: ...
|
||||
def language_changed(**kwargs: Any) -> None: ...
|
||||
def localize_settings_changed(**kwargs: Any) -> None: ...
|
||||
def file_storage_changed(**kwargs: Any) -> None: ...
|
||||
def complex_setting_changed(**kwargs: Any) -> None: ...
|
||||
def root_urlconf_changed(**kwargs: Any) -> None: ...
|
||||
def static_storage_changed(**kwargs: Any) -> None: ...
|
||||
def static_finders_changed(**kwargs: Any) -> None: ...
|
||||
def auth_password_validators_changed(**kwargs: Any) -> None: ...
|
||||
def user_model_swapped(**kwargs: Any) -> None: ...
|
||||
+167
-70
@@ -1,85 +1,182 @@
|
||||
# Stubs for django.test.testcases (Python 3.6)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
import threading
|
||||
import unittest
|
||||
from django.core.handlers.wsgi import WSGIHandler
|
||||
from django.core.servers.basehttp import WSGIRequestHandler
|
||||
from django.test.utils import CaptureQueriesContext
|
||||
from typing import Any, Optional
|
||||
|
||||
from contextlib import _GeneratorContextManager
|
||||
from django.db.backends.sqlite3.base import DatabaseWrapper
|
||||
from django.http.response import (
|
||||
HttpResponse,
|
||||
HttpResponseBase,
|
||||
)
|
||||
from typing import (
|
||||
Any,
|
||||
Callable,
|
||||
Dict,
|
||||
Iterator,
|
||||
List,
|
||||
Optional,
|
||||
Tuple,
|
||||
Type,
|
||||
Union,
|
||||
)
|
||||
from unittest.case import (
|
||||
_AssertRaisesContext,
|
||||
_AssertWarnsContext,
|
||||
)
|
||||
from django.http.response import HttpResponse, HttpResponseBase
|
||||
from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Type, Union
|
||||
from unittest.case import _AssertRaisesContext, _AssertWarnsContext
|
||||
from unittest.runner import TextTestResult
|
||||
class _AssertNumQueriesContext(CaptureQueriesContext):
|
||||
test_case: Any = ...
|
||||
num: Any = ...
|
||||
def __init__(self, test_case: Any, num: Any, connection: Any) -> None: ...
|
||||
def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any): ...
|
||||
|
||||
class _AssertTemplateUsedContext:
|
||||
test_case: Any = ...
|
||||
template_name: Any = ...
|
||||
rendered_templates: Any = ...
|
||||
rendered_template_names: Any = ...
|
||||
context: Any = ...
|
||||
def __init__(self, test_case: Any, template_name: Any) -> None: ...
|
||||
def on_template_render(self, sender: Any, signal: Any, template: Any, context: Any, **kwargs: Any) -> None: ...
|
||||
def test(self): ...
|
||||
def message(self): ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any): ...
|
||||
|
||||
class _AssertTemplateNotUsedContext(_AssertTemplateUsedContext):
|
||||
def test(self): ...
|
||||
def message(self): ...
|
||||
|
||||
class _CursorFailure:
|
||||
cls_name: Any = ...
|
||||
wrapped: Any = ...
|
||||
def __init__(self, cls_name: Any, wrapped: Any) -> None: ...
|
||||
def __call__(self) -> None: ...
|
||||
|
||||
class SimpleTestCase(unittest.TestCase):
|
||||
client_class: Any = ...
|
||||
_overridden_settings: Any = ...
|
||||
_modified_settings: Any = ...
|
||||
allow_database_queries: bool = ...
|
||||
@classmethod
|
||||
def setUpClass(cls) -> None: ...
|
||||
@classmethod
|
||||
def tearDownClass(cls) -> None: ...
|
||||
def __call__(self, result: TextTestResult = ...) -> None: ...
|
||||
client: Any = ...
|
||||
def _pre_setup(self) -> None: ...
|
||||
def _post_teardown(self) -> None: ...
|
||||
def settings(self, **kwargs: Any): ...
|
||||
def modify_settings(self, **kwargs: Any): ...
|
||||
def assertRedirects(self, response: Any, expected_url: Any, status_code: int = ..., target_status_code: int = ..., msg_prefix: str = ..., fetch_redirect_response: bool = ...) -> None: ...
|
||||
def _assert_contains(self, response: HttpResponseBase, text: Union[str, bytes, int], status_code: int, msg_prefix: str, html: bool) -> Tuple[str, int, str]: ...
|
||||
def assertContains(self, response: Any, text: Any, count: Optional[Any] = ..., status_code: int = ..., msg_prefix: str = ..., html: bool = ...) -> None: ...
|
||||
def assertNotContains(self, response: Any, text: Any, status_code: int = ..., msg_prefix: str = ..., html: bool = ...) -> None: ...
|
||||
def assertFormError(self, response: Any, form: Any, field: Any, errors: Any, msg_prefix: str = ...) -> None: ...
|
||||
def assertFormsetError(self, response: Any, formset: Any, form_index: Any, field: Any, errors: Any, msg_prefix: str = ...) -> None: ...
|
||||
def _assert_template_used(self, response: Optional[Union[str, HttpResponse]], template_name: Optional[str], msg_prefix: str) -> Union[Tuple[None, List[Any], str], Tuple[str, None, str], Tuple[None, List[str], str]]: ...
|
||||
def assertTemplateUsed(self, response: Optional[Any] = ..., template_name: Optional[Any] = ..., msg_prefix: str = ..., count: Optional[Any] = ...): ...
|
||||
def assertTemplateNotUsed(self, response: Optional[Any] = ..., template_name: Optional[Any] = ..., msg_prefix: str = ...): ...
|
||||
def _assert_raises_or_warns_cm(self, func: Callable, cm_attr: str, expected_exception: Type[Exception], expected_message: str) -> Iterator[Union[_AssertRaisesContext, _AssertWarnsContext]]: ...
|
||||
def _assertFooMessage(self, func: Callable, cm_attr: str, expected_exception: Type[Exception], expected_message: str, *args: Any, **kwargs: Any) -> _GeneratorContextManager: ...
|
||||
def assertRaisesMessage(self, expected_exception: Any, expected_message: Any, *args: Any, **kwargs: Any): ...
|
||||
def assertWarnsMessage(self, expected_warning: Any, expected_message: Any, *args: Any, **kwargs: Any): ...
|
||||
def assertFieldOutput(self, fieldclass: Any, valid: Any, invalid: Any, field_args: Optional[Any] = ..., field_kwargs: Optional[Any] = ..., empty_value: str = ...) -> None: ...
|
||||
def assertHTMLEqual(self, html1: Any, html2: Any, msg: Optional[Any] = ...) -> None: ...
|
||||
def assertHTMLNotEqual(self, html1: Any, html2: Any, msg: Optional[Any] = ...) -> None: ...
|
||||
def assertInHTML(self, needle: Any, haystack: Any, count: Optional[Any] = ..., msg_prefix: str = ...) -> None: ...
|
||||
def assertJSONEqual(self, raw: Any, expected_data: Any, msg: Optional[Any] = ...) -> None: ...
|
||||
def assertJSONNotEqual(self, raw: Any, expected_data: Any, msg: Optional[Any] = ...) -> None: ...
|
||||
def assertXMLEqual(self, xml1: Any, xml2: Any, msg: Optional[Any] = ...) -> None: ...
|
||||
def assertXMLNotEqual(self, xml1: Any, xml2: Any, msg: Optional[Any] = ...) -> None: ...
|
||||
|
||||
class TransactionTestCase(SimpleTestCase):
|
||||
reset_sequences: bool = ...
|
||||
available_apps: Any = ...
|
||||
fixtures: Any = ...
|
||||
multi_db: bool = ...
|
||||
serialized_rollback: bool = ...
|
||||
allow_database_queries: bool = ...
|
||||
def _pre_setup(self) -> None: ...
|
||||
@classmethod
|
||||
def _databases_names(cls, include_mirrors: bool = ...): ...
|
||||
def _reset_sequences(self, db_name: Any) -> None: ...
|
||||
def _fixture_setup(self) -> None: ...
|
||||
def _should_reload_connections(self): ...
|
||||
def _post_teardown(self) -> None: ...
|
||||
def _fixture_teardown(self) -> None: ...
|
||||
def assertQuerysetEqual(self, qs: Any, values: Any, transform: Any = ..., ordered: bool = ..., msg: Optional[Any] = ...): ...
|
||||
def assertNumQueries(self, num: Any, func: Optional[Any] = ..., *args: Any, using: Any = ..., **kwargs: Any): ...
|
||||
|
||||
class TestCase(TransactionTestCase):
|
||||
@classmethod
|
||||
def _enter_atomics(cls): ...
|
||||
@classmethod
|
||||
def _rollback_atomics(cls, atomics: Any) -> None: ...
|
||||
@classmethod
|
||||
def setUpClass(cls): ...
|
||||
@classmethod
|
||||
def tearDownClass(cls) -> None: ...
|
||||
@classmethod
|
||||
def setUpTestData(cls) -> None: ...
|
||||
def _should_reload_connections(self): ...
|
||||
atomics: Any = ...
|
||||
def _fixture_setup(self): ...
|
||||
def _fixture_teardown(self): ...
|
||||
def _should_check_constraints(self, connection: Any): ...
|
||||
|
||||
class CheckCondition:
|
||||
conditions: Any = ...
|
||||
def __init__(self, *conditions: Any) -> None: ...
|
||||
def add_condition(self, condition: Any, reason: Any): ...
|
||||
def __get__(self, instance: None, cls: Type[TestCase] = ...) -> bool: ...
|
||||
def __init__(self, *conditions) -> None: ...
|
||||
|
||||
def skipIfDBFeature(*features: Any): ...
|
||||
def skipUnlessDBFeature(*features: Any): ...
|
||||
|
||||
class LiveServerTestCase:
|
||||
class QuietWSGIRequestHandler(WSGIRequestHandler):
|
||||
def log_message(*args: Any) -> None: ...
|
||||
|
||||
class FSFilesHandler(WSGIHandler):
|
||||
application: Any = ...
|
||||
base_url: Any = ...
|
||||
def __init__(self, application: Any) -> None: ...
|
||||
def _should_handle(self, path: Any): ...
|
||||
def file_path(self, url: Any): ...
|
||||
def get_response(self, request: Any): ...
|
||||
def serve(self, request: Any): ...
|
||||
def __call__(self, environ: Any, start_response: Any): ...
|
||||
|
||||
class _StaticFilesHandler(FSFilesHandler):
|
||||
def get_base_dir(self): ...
|
||||
def get_base_url(self): ...
|
||||
|
||||
class _MediaFilesHandler(FSFilesHandler):
|
||||
def get_base_dir(self): ...
|
||||
def get_base_url(self): ...
|
||||
|
||||
class LiveServerThread(threading.Thread):
|
||||
host: Any = ...
|
||||
port: Any = ...
|
||||
is_ready: Any = ...
|
||||
error: Any = ...
|
||||
static_handler: Any = ...
|
||||
connections_override: Any = ...
|
||||
def __init__(self, host: str, static_handler: Type[_StaticFilesHandler], connections_override: Dict[str, DatabaseWrapper] = ..., port: int = ...) -> None: ...
|
||||
httpd: Any = ...
|
||||
def run(self) -> None: ...
|
||||
def _create_server(self): ...
|
||||
def terminate(self) -> None: ...
|
||||
|
||||
class LiveServerTestCase(TransactionTestCase):
|
||||
host: str = ...
|
||||
port: int = ...
|
||||
server_thread_class: Any = ...
|
||||
static_handler: Any = ...
|
||||
def live_server_url(cls): ...
|
||||
@classmethod
|
||||
def _create_server_thread(
|
||||
cls,
|
||||
connections_override: Dict[str, DatabaseWrapper]
|
||||
) -> LiveServerThread: ...
|
||||
def setUpClass(cls) -> None: ...
|
||||
@classmethod
|
||||
def _create_server_thread(cls, connections_override: Dict[str, DatabaseWrapper]) -> LiveServerThread: ...
|
||||
@classmethod
|
||||
def _tearDownClassInternal(cls) -> None: ...
|
||||
@classmethod
|
||||
def tearDownClass(cls) -> None: ...
|
||||
|
||||
|
||||
class LiveServerThread:
|
||||
def __init__(
|
||||
self,
|
||||
host: str,
|
||||
static_handler: Type[_StaticFilesHandler],
|
||||
connections_override: Dict[str, DatabaseWrapper] = ...,
|
||||
port: int = ...
|
||||
) -> None: ...
|
||||
def terminate(self) -> None: ...
|
||||
|
||||
|
||||
class SimpleTestCase:
|
||||
def __call__(self, result: TextTestResult = ...) -> None: ...
|
||||
def _assertFooMessage(
|
||||
self,
|
||||
func: Callable,
|
||||
cm_attr: str,
|
||||
expected_exception: Type[Exception],
|
||||
expected_message: str,
|
||||
*args,
|
||||
**kwargs
|
||||
) -> _GeneratorContextManager: ...
|
||||
def _assert_contains(
|
||||
self,
|
||||
response: HttpResponseBase,
|
||||
text: Union[str, bytes, int],
|
||||
status_code: int,
|
||||
msg_prefix: str,
|
||||
html: bool
|
||||
) -> Tuple[str, int, str]: ...
|
||||
def _assert_raises_or_warns_cm(
|
||||
self,
|
||||
func: Callable,
|
||||
cm_attr: str,
|
||||
expected_exception: Type[Exception],
|
||||
expected_message: str
|
||||
) -> Iterator[Union[_AssertRaisesContext, _AssertWarnsContext]]: ...
|
||||
def _assert_template_used(
|
||||
self,
|
||||
response: Optional[Union[str, HttpResponse]],
|
||||
template_name: Optional[str],
|
||||
msg_prefix: str
|
||||
) -> Union[Tuple[None, List[Any], str], Tuple[str, None, str], Tuple[None, List[str], str]]: ...
|
||||
def _post_teardown(self) -> None: ...
|
||||
class SerializeMixin:
|
||||
lockfile: Any = ...
|
||||
@classmethod
|
||||
def setUpClass(cls) -> None: ...
|
||||
@classmethod
|
||||
def tearDownClass(cls) -> None: ...
|
||||
Reference in new issue
Block a user