Skip to content
Snippets Groups Projects
conftest.py 722 B
Newer Older
  • Learn to ignore specific revisions
  • 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