38 lines
722 B
Python
38 lines
722 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"},
|
|
"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
|