43 lines
804 B
Python
43 lines
804 B
Python
import pytest
|
|
|
|
import mopidy_funkwhale.actor
|
|
import mopidy_funkwhale.client
|
|
import mopidy_funkwhale.library
|
|
|
|
FUNKWHALE_URL = "https://test.funkwhale"
|
|
|
|
|
|
@pytest.fixture()
|
|
def config():
|
|
return {
|
|
"funkwhale": {
|
|
"url": FUNKWHALE_URL,
|
|
"username": "user",
|
|
"password": "passw0rd",
|
|
"cache_duration": 600,
|
|
},
|
|
"proxy": {},
|
|
}
|
|
|
|
|
|
@pytest.fixture
|
|
def backend(config):
|
|
return mopidy_funkwhale.actor.FunkwhaleBackend(config=config, audio=None)
|
|
|
|
|
|
@pytest.fixture()
|
|
def session(backend):
|
|
return mopidy_funkwhale.client.get_requests_session(
|
|
FUNKWHALE_URL, {}, "test/something"
|
|
)
|
|
|
|
|
|
@pytest.fixture()
|
|
def client(backend, session):
|
|
return backend.client
|
|
|
|
|
|
@pytest.fixture
|
|
def library(backend):
|
|
return backend.library
|