add test_views test folder

This commit is contained in:
Maxim Kurnikov
2019-02-03 19:51:17 +03:00
parent d03fddd96d
commit 5f6b4bfd30
5 changed files with 34 additions and 31 deletions

View File

@@ -1,4 +1,6 @@
from importlib.abc import SourceLoader
from typing import Any, Callable, Dict, List, Optional, Type, Union
from types import TracebackType
from django.core.handlers.wsgi import WSGIRequest
from django.http.request import QueryDict
@@ -16,8 +18,8 @@ class CallableSettingWrapper:
def cleanse_setting(key: Union[int, str], value: Any) -> Any: ...
def get_safe_settings() -> Dict[str, Any]: ...
def technical_500_response(request: Any, exc_type: Any, exc_value: Any, tb: Any, status_code: int = ...): ...
def get_default_exception_reporter_filter() -> SafeExceptionReporterFilter: ...
def get_exception_reporter_filter(request: Optional[WSGIRequest]) -> SafeExceptionReporterFilter: ...
def get_default_exception_reporter_filter() -> ExceptionReporterFilter: ...
def get_exception_reporter_filter(request: Optional[WSGIRequest]) -> ExceptionReporterFilter: ...
class ExceptionReporterFilter:
def get_post_parameters(self, request: Any): ...
@@ -32,7 +34,7 @@ class SafeExceptionReporterFilter(ExceptionReporterFilter):
class ExceptionReporter:
request: Optional[WSGIRequest] = ...
filter: django.views.debug.SafeExceptionReporterFilter = ...
filter: ExceptionReporterFilter = ...
exc_type: None = ...
exc_value: Optional[str] = ...
tb: None = ...
@@ -41,12 +43,25 @@ class ExceptionReporter:
template_does_not_exist: bool = ...
postmortem: None = ...
def __init__(
self, request: Optional[WSGIRequest], exc_type: None, exc_value: Optional[str], tb: None, is_email: bool = ...
self,
request: Optional[WSGIRequest],
exc_type: Optional[Type[BaseException]],
exc_value: Optional[Union[str, BaseException]],
tb: Optional[TracebackType],
is_email: bool = ...,
) -> None: ...
def get_traceback_data(self) -> Dict[str, Any]: ...
def get_traceback_html(self) -> SafeText: ...
def get_traceback_text(self) -> SafeText: ...
def get_traceback_frames(self) -> List[Any]: ...
def _get_lines_from_file(
self,
filename: str,
lineno: int,
context_lines: int,
loader: Optional[SourceLoader] = ...,
module_name: Optional[str] = None,
): ...
def technical_404_response(request: WSGIRequest, exception: Http404) -> HttpResponse: ...
def default_urlconf(request: WSGIRequest) -> HttpResponse: ...