assertions¶
A module containing frequently used checks throughout the tests
Functions
- is_login_redirect(response: HttpResponse, next: str | None = None) bool [source]¶
Checks if a response is a redirect to a login page
If the parameter
next
is passed, checks if the success_url of the login is that url
- is_redirect(response: HttpResponse, url: str | None = None, part: Literal['base', 'full', 'end'] = 'full') bool [source]¶
Checks if
response
is a redirect.- Parameters:
url – Checks if redirect url is the same as url
part – Which part of the url to check. Can be base, full, or end.
- not_login_redirect(response: HttpResponse, **kwargs: str | None) bool [source]¶
Inverse of
is_login_redirect
- not_redirect(response: HttpResponse) bool [source]¶
Inverse of
is_redirect