mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-15 08:17:08 +08:00
black reformat, some fixes
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
from .testcases import TestCase as TestCase, TransactionTestCase as TransactionTestCase, SimpleTestCase as SimpleTestCase
|
||||
from .testcases import (
|
||||
TestCase as TestCase,
|
||||
TransactionTestCase as TransactionTestCase,
|
||||
SimpleTestCase as SimpleTestCase,
|
||||
)
|
||||
|
||||
from .utils import override_settings as override_settings
|
||||
|
||||
@@ -50,7 +50,12 @@ class RequestFactory:
|
||||
) -> Union[WSGIRequest, HttpResponse]: ...
|
||||
def trace(self, path: str, secure: bool = ..., **extra: Any) -> Union[WSGIRequest, HttpResponse]: ...
|
||||
def options(
|
||||
self, path: str, data: Union[Dict[str, str], str] = ..., content_type: str = ..., secure: bool = ..., **extra: Any
|
||||
self,
|
||||
path: str,
|
||||
data: Union[Dict[str, str], str] = ...,
|
||||
content_type: str = ...,
|
||||
secure: bool = ...,
|
||||
**extra: Any
|
||||
) -> Union[WSGIRequest, HttpResponse]: ...
|
||||
def put(
|
||||
self,
|
||||
@@ -109,7 +114,12 @@ class Client(RequestFactory):
|
||||
self, path: str, data: Any = ..., content_type: str = ..., follow: bool = ..., secure: bool = ..., **extra: Any
|
||||
) -> HttpResponseBase: ...
|
||||
def head(
|
||||
self, path: str, data: Optional[Union[Dict[str, str], str]] = ..., follow: bool = ..., secure: bool = ..., **extra: Any
|
||||
self,
|
||||
path: str,
|
||||
data: Optional[Union[Dict[str, str], str]] = ...,
|
||||
follow: bool = ...,
|
||||
secure: bool = ...,
|
||||
**extra: Any
|
||||
) -> HttpResponse: ...
|
||||
def options(
|
||||
self,
|
||||
|
||||
@@ -115,7 +115,10 @@ class DiscoverRunner:
|
||||
def add_arguments(cls, parser: ArgumentParser) -> None: ...
|
||||
def setup_test_environment(self, **kwargs: Any) -> None: ...
|
||||
def build_suite(
|
||||
self, test_labels: Union[List[str], Tuple[str, str]] = ..., extra_tests: Optional[List[Any]] = ..., **kwargs: Any
|
||||
self,
|
||||
test_labels: Union[List[str], Tuple[str, str]] = ...,
|
||||
extra_tests: Optional[List[Any]] = ...,
|
||||
**kwargs: Any
|
||||
) -> TestSuite: ...
|
||||
def setup_databases(self, **kwargs: Any) -> List[Tuple[BaseDatabaseWrapper, str, bool]]: ...
|
||||
def get_resultclass(self) -> Optional[Type[DebugSQLTextTestResult]]: ...
|
||||
@@ -128,7 +131,9 @@ class DiscoverRunner:
|
||||
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 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: ...
|
||||
|
||||
@@ -84,10 +84,20 @@ class SimpleTestCase(unittest.TestCase):
|
||||
html: bool = ...,
|
||||
) -> None: ...
|
||||
def assertNotContains(
|
||||
self, response: HttpResponse, text: Union[bytes, str], status_code: int = ..., msg_prefix: str = ..., html: bool = ...
|
||||
self,
|
||||
response: HttpResponse,
|
||||
text: Union[bytes, str],
|
||||
status_code: int = ...,
|
||||
msg_prefix: str = ...,
|
||||
html: bool = ...,
|
||||
) -> None: ...
|
||||
def assertFormError(
|
||||
self, response: HttpResponse, form: str, field: Optional[str], errors: Union[List[str], str], msg_prefix: str = ...
|
||||
self,
|
||||
response: HttpResponse,
|
||||
form: str,
|
||||
field: Optional[str],
|
||||
errors: Union[List[str], str],
|
||||
msg_prefix: str = ...,
|
||||
) -> None: ...
|
||||
def assertFormsetError(
|
||||
self,
|
||||
@@ -125,7 +135,9 @@ class SimpleTestCase(unittest.TestCase):
|
||||
) -> Any: ...
|
||||
def assertHTMLEqual(self, html1: str, html2: str, msg: None = ...) -> None: ...
|
||||
def assertHTMLNotEqual(self, html1: str, html2: str, msg: None = ...) -> None: ...
|
||||
def assertInHTML(self, needle: str, haystack: SafeText, count: Optional[int] = ..., msg_prefix: str = ...) -> None: ...
|
||||
def assertInHTML(
|
||||
self, needle: str, haystack: SafeText, count: Optional[int] = ..., msg_prefix: str = ...
|
||||
) -> None: ...
|
||||
def assertJSONEqual(self, raw: str, expected_data: Union[Dict[str, str], bool, str], msg: None = ...) -> None: ...
|
||||
def assertJSONNotEqual(self, raw: str, expected_data: str, msg: None = ...) -> None: ...
|
||||
def assertXMLEqual(self, xml1: str, xml2: str, msg: None = ...) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user