fixes, add some testing folders

This commit is contained in:
Maxim Kurnikov
2019-02-04 19:31:37 +03:00
parent 3dcab64e07
commit 69d4ccaf54
31 changed files with 319 additions and 236 deletions

View File

@@ -1,18 +1,17 @@
from typing import Any, Optional, Callable
from typing import Any, Optional
from django.core.handlers.wsgi import WSGIRequest
from django.http.request import HttpRequest
from django.http.response import HttpResponseBase, HttpResponseNotFound, HttpResponsePermanentRedirect
from django.http.response import HttpResponse, HttpResponseNotFound, HttpResponsePermanentRedirect
from django.utils.deprecation import MiddlewareMixin
class CommonMiddleware(MiddlewareMixin):
response_redirect_class: Any = ...
def process_request(self, request: WSGIRequest) -> Optional[HttpResponsePermanentRedirect]: ...
def should_redirect_with_slash(self, request: WSGIRequest) -> bool: ...
def get_full_path_with_slash(self, request: WSGIRequest) -> str: ...
def process_response(self, request: HttpRequest, response: HttpResponseBase) -> HttpResponseBase: ...
def process_request(self, request: HttpRequest) -> Optional[HttpResponsePermanentRedirect]: ...
def should_redirect_with_slash(self, request: HttpRequest) -> bool: ...
def get_full_path_with_slash(self, request: HttpRequest) -> str: ...
def process_response(self, request: HttpRequest, response: HttpResponse) -> HttpResponse: ...
class BrokenLinkEmailsMiddleware(MiddlewareMixin):
def process_response(self, request: WSGIRequest, response: HttpResponseNotFound) -> HttpResponseNotFound: ...
def process_response(self, request: HttpRequest, response: HttpResponseNotFound) -> HttpResponseNotFound: ...
def is_internal_request(self, domain: str, referer: str) -> bool: ...
def is_ignorable_request(self, request: WSGIRequest, uri: str, domain: str, referer: str) -> bool: ...
def is_ignorable_request(self, request: HttpRequest, uri: str, domain: str, referer: str) -> bool: ...