tests.custom_flask_client.CustomFlaskClient

class tests.custom_flask_client.CustomFlaskClient(*args: Any, **kwargs: Any)

Bases: flask.testing.FlaskClient

Attributes

CustomFlaskClient.preserve_context

Methods

CustomFlaskClient.__init__(*args, **kwargs)

CustomFlaskClient.after_request(response)

CustomFlaskClient.before_request(*args, **kwargs)

CustomFlaskClient.delete(*args, **kwargs)

Like open but method is enforced to DELETE.

CustomFlaskClient.delete_cookie(server_name, key)

Deletes a cookie in the test client.

CustomFlaskClient.get(*args, **kwargs)

Like open but method is enforced to GET.

CustomFlaskClient.head(*args, **kw)

Call open() with method set to HEAD.

CustomFlaskClient.make_request(method, ...)

CustomFlaskClient.open(*args[, as_tuple, ...])

Generate an environ dict from the given arguments, make a request to the application using it, and return the response.

CustomFlaskClient.options(*args, **kw)

Call open() with method set to OPTIONS.

CustomFlaskClient.patch(*args, **kw)

Call open() with method set to PATCH.

CustomFlaskClient.post(*args, **kwargs)

Like open but method is enforced to POST.

CustomFlaskClient.put(*args, **kwargs)

Like open but method is enforced to PUT.

CustomFlaskClient.resolve_redirect(response)

Perform a new request to the location given by the redirect response to the previous request.

CustomFlaskClient.run_wsgi_app(environ[, ...])

Runs the wrapped WSGI app with the given environment.

CustomFlaskClient.session_transaction(*args, ...)

When used in combination with a with statement this opens a session transaction.

CustomFlaskClient.set_cookie(server_name, key)

Sets a cookie in the client's cookie jar.

CustomFlaskClient.trace(*args, **kw)

Call open() with method set to TRACE.