def test_url(url, params): assert settings_url_parse(url) == params
def test_url_with_redis_as_backend(url, params): from cashews.backends.redis import Redis params["backend"] = Redis assert settings_url_parse(url) == params
def test_url_with_diskcache_as_backend(url, params): from cashews.backends.diskcache import DiskCache params["backend"] = DiskCache assert settings_url_parse(url) == params
def test_url_but_backend_dependency_is_not_installed(url, error): with pytest.raises(BackendNotAvailable) as excinfo: settings_url_parse(url) assert str(excinfo.value) == error