more cleanups

This commit is contained in:
Maxim Kurnikov
2018-12-22 04:42:37 +03:00
parent 59b8008a21
commit 9a2b88b270
117 changed files with 94 additions and 2798 deletions

View File

@@ -5,34 +5,34 @@ from datetime import date
from typing import Any, Callable, Dict, Iterator, List, Optional, Set, Tuple, Type, Union
from unittest.runner import TextTestResult
from django.core.exceptions import ImproperlyConfigured
from django.core.handlers.wsgi import WSGIHandler
from django.core.servers.basehttp import WSGIRequestHandler
from django.core.servers.basehttp import WSGIRequestHandler, ThreadedWSGIServer
from django.db.backends.sqlite3.base import DatabaseWrapper
from django.db.models.base import Model
from django.db.models.query import QuerySet, RawQuerySet
from django.forms.fields import EmailField
from django.http.response import HttpResponse, HttpResponseBase
from django.template.context import Context
from django.test.html import Element
from django.test.utils import CaptureQueriesContext, ContextList, modify_settings, override_settings
from django.template.base import Template
from django.test.utils import CaptureQueriesContext, modify_settings, override_settings, ContextList
from django.utils.safestring import SafeText
class _AssertNumQueriesContext(CaptureQueriesContext):
connection: django.db.backends.sqlite3.base.DatabaseWrapper
connection: Any
final_queries: Optional[int]
force_debug_cursor: bool
initial_queries: int
test_case: Union[django.test.testcases.SerializeMixin, django.test.testcases.TransactionTestCase] = ...
test_case: SimpleTestCase = ...
num: int = ...
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: django.test.testcases.SimpleTestCase = ...
test_case: SimpleTestCase = ...
template_name: str = ...
rendered_templates: List[django.template.base.Template] = ...
rendered_templates: List[Template] = ...
rendered_template_names: List[str] = ...
context: django.test.utils.ContextList = ...
context: ContextList = ...
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): ...
@@ -41,11 +41,11 @@ class _AssertTemplateUsedContext:
def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any): ...
class _AssertTemplateNotUsedContext(_AssertTemplateUsedContext):
context: django.test.utils.ContextList
context: ContextList
rendered_template_names: List[str]
rendered_templates: List[django.template.base.Template]
rendered_templates: List[Template]
template_name: str
test_case: django.test.testcases.SimpleTestCase
test_case: SimpleTestCase
def test(self): ...
def message(self): ...
@@ -203,9 +203,9 @@ class LiveServerThread(threading.Thread):
host: str = ...
port: int = ...
is_ready: threading.Event = ...
error: Optional[django.core.exceptions.ImproperlyConfigured] = ...
static_handler: Type[django.core.handlers.wsgi.WSGIHandler] = ...
connections_override: Dict[str, django.db.backends.sqlite3.base.DatabaseWrapper] = ...
error: Optional[ImproperlyConfigured] = ...
static_handler: Type[WSGIHandler] = ...
connections_override: Dict[str, Any] = ...
def __init__(
self,
host: str,
@@ -213,7 +213,7 @@ class LiveServerThread(threading.Thread):
connections_override: Dict[str, DatabaseWrapper] = ...,
port: int = ...,
) -> None: ...
httpd: django.core.servers.basehttp.ThreadedWSGIServer = ...
httpd: ThreadedWSGIServer = ...
def run(self) -> None: ...
def terminate(self) -> None: ...