Skip to content

prefix_url

Scope: function | Returns: callable

The prefix_url fixture returns a callable that prepends the test database name to a URL path. Lime CRM endpoints are prefixed with the database name, so this fixture is used alongside HTTP client fixtures to build correct request URLs.

Signature

prefix_url(url: str) -> str

Basic usage

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

    assert response.status_code == 200