Skip to content

web_client_non_admin

Scope: function | Returns: FlaskClient

The web_client_non_admin fixture provides an authenticated HTTP test client for the non-admin user. Use it to test endpoints under restricted permissions.

Warning

Only one web client fixture (web_client, web_client_non_admin, web_client_other_non_admin, api_client) can be used in a single test.

Basic usage

def test_endpoint(web_client_non_admin, prefix_url):
    response = web_client_non_admin.get(prefix_url("api/v1/limeobject/company/"))

    assert response.status_code == 200