Skip to content

non_admin_user

Scope: function | Returns: LimeUser

The non_admin_user fixture provides the user with standard permissions.

Default implementation

By default, non_admin_user fetches the user with username standard from the test database:

@pytest.fixture
def non_admin_user(user_repository) -> LimeUser:
    return user_repository.get_by_username("standard")

Customization

Override non_admin_user. Use the create_user fixture to create a fresh user for the test:

@pytest.fixture
def non_admin_user(create_user):
    return create_user(
        username="custom_user",
        full_name="Custom User",
        _return_entity=True,
    )