コード例 #1
0
ファイル: __init__.py プロジェクト: vincentDcmps/mopidy-mpd
    def setUp(self):  # noqa: N802
        if self.enable_mixer:
            self.mixer = dummy_mixer.create_proxy()
        else:
            self.mixer = None
        self.audio = dummy_audio.create_proxy()
        self.backend = dummy_backend.create_proxy(audio=self.audio)

        self.core = core.Core.start(
            self.get_config(),
            audio=self.audio,
            mixer=self.mixer,
            backends=[self.backend],
        ).proxy()

        self.uri_map = uri_mapper.MpdUriMapper(self.core)
        self.connection = MockConnection()
        self.session = session.MpdSession(
            self.connection,
            config=self.get_config(),
            core=self.core,
            uri_map=self.uri_map,
        )
        self.dispatcher = self.session.dispatcher
        self.context = self.dispatcher.context
コード例 #2
0
ファイル: test_status.py プロジェクト: tylerball/mopidy
 def setUp(self):  # noqa: N802
     self.mixer = dummy_mixer.create_proxy()
     self.backend = dummy_backend.create_proxy()
     self.core = core.Core.start(
         mixer=self.mixer, backends=[self.backend]).proxy()
     self.dispatcher = dispatcher.MpdDispatcher(core=self.core)
     self.context = self.dispatcher.context
コード例 #3
0
 def setUp(self):
     objects.MprisObject._connect_to_dbus = mock.Mock()
     self.backend = dummy_backend.create_proxy()
     self.mixer = dummy_mixer.create_proxy()
     config = {'core': {'max_tracklist_length': 10000}}
     self.core = core.Core.start(
         config=config, backends=[self.backend], mixer=self.mixer).proxy()
     self.mpris = objects.MprisObject(config=config, core=self.core)
コード例 #4
0
ファイル: test_status.py プロジェクト: kidaa30/mopidy
    def setUp(self):  # noqa: N802
        config = {"core": {"max_tracklist_length": 10000}}

        self.audio = dummy_audio.create_proxy()
        self.mixer = dummy_mixer.create_proxy()
        self.backend = dummy_backend.create_proxy(audio=self.audio)

        with deprecation.ignore():
            self.core = core.Core.start(config, audio=self.audio, mixer=self.mixer, backends=[self.backend]).proxy()

        self.dispatcher = dispatcher.MpdDispatcher(core=self.core)
        self.context = self.dispatcher.context
コード例 #5
0
    def setUp(self):  # noqa: N802
        config = {"core": {"max_tracklist_length": 10000}}

        self.audio = dummy_audio.create_proxy()
        self.mixer = dummy_mixer.create_proxy()
        self.backend = dummy_backend.create_proxy(audio=self.audio)

        self.core = core.Core.start(
            config, audio=self.audio, mixer=self.mixer, backends=[self.backend],
        ).proxy()

        self.dispatcher = dispatcher.MpdDispatcher(core=self.core)
        self.context = self.dispatcher.context
コード例 #6
0
ファイル: __init__.py プロジェクト: FabrizioCongia/mopidy
    def setUp(self):  # noqa: N802
        if self.enable_mixer:
            self.mixer = dummy_mixer.create_proxy()
        else:
            self.mixer = None
        self.backend = dummy_backend.create_proxy()
        self.core = core.Core.start(
            mixer=self.mixer, backends=[self.backend]).proxy()

        self.uri_map = uri_mapper.MpdUriMapper(self.core)
        self.connection = MockConnection()
        self.session = session.MpdSession(
            self.connection, config=self.get_config(), core=self.core,
            uri_map=self.uri_map)
        self.dispatcher = self.session.dispatcher
        self.context = self.dispatcher.context
コード例 #7
0
ファイル: test_actor.py プロジェクト: zwl1671/mopidy
    def setUp(self):
        self.temp_dir = tempfile.mkdtemp()
        self.state_file = pathlib.Path(
            self.temp_dir) / "core" / "state.json.gz"
        self.state_file.parent.mkdir()

        config = {
            "core": {
                "max_tracklist_length": 10000,
                "restore_state": True,
                "data_dir": self.temp_dir,
            }
        }

        self.mixer = dummy_mixer.create_proxy()
        self.core = Core(config=config, mixer=self.mixer, backends=[])
コード例 #8
0
    def setUp(self):
        self.temp_dir = tempfile.mkdtemp()
        self.state_file = os.path.join(self.temp_dir, b'core',
                                       b'state.json.gz')

        config = {
            'core': {
                'max_tracklist_length': 10000,
                'restore_state': True,
                'data_dir': self.temp_dir,
            }
        }

        os.mkdir(os.path.join(self.temp_dir, b'core'))

        self.mixer = dummy_mixer.create_proxy()
        self.core = Core(config=config, mixer=self.mixer, backends=[])
コード例 #9
0
ファイル: test_status.py プロジェクト: vrs01/mopidy
    def setUp(self):  # noqa: N802
        config = {
            'core': {
                'max_tracklist_length': 10000,
            }
        }

        self.mixer = dummy_mixer.create_proxy()
        self.backend = dummy_backend.create_proxy()

        with deprecation.ignore():
            self.core = core.Core.start(config,
                                        mixer=self.mixer,
                                        backends=[self.backend]).proxy()

        self.dispatcher = dispatcher.MpdDispatcher(core=self.core)
        self.context = self.dispatcher.context
コード例 #10
0
ファイル: test_actor.py プロジェクト: AddBassStudios/mopidy
    def setUp(self):
        self.temp_dir = tempfile.mkdtemp()
        self.state_file = os.path.join(self.temp_dir,
                                       b'core', b'state.json.gz')

        config = {
            'core': {
                'max_tracklist_length': 10000,
                'restore_state': True,
                'data_dir': self.temp_dir,
            }
        }

        os.mkdir(os.path.join(self.temp_dir, b'core'))

        self.mixer = dummy_mixer.create_proxy()
        self.core = Core(
            config=config, mixer=self.mixer, backends=[])
コード例 #11
0
def frontend(monkeypatch):
    config = {
        "choosmoos": {
            "nfc_demo_app_location": None,
            "next_pin_number": 3,
            "previous_pin_number": 4,
            "volume_up_pin_number": 1,
            "volume_down_pin_number": 2,
            "play_pause_pin_number": 5,
        },
        "spotify": {
            "username": "******",
            "password": "******",
            "bitrate": 160,
            "volume_normalization": True,
            "private_session": False,
            "timeout": 10,
            "allow_cache": True,
            "allow_network": True,
            "allow_playlists": True,
            "search_album_count": 20,
            "search_artist_count": 10,
            "search_track_count": 50,
            "toplist_countries": ["GB", "US"],
            "client_id": "abcd1234",
            "client_secret": "YWJjZDEyMzQ=",
        },
    }

    monkeypatch.setattr(os, "system", mock_system)
    Device.pin_factory = MockFactory()
    mixer = dummy_mixer.create_proxy()
    audio = dummy_audio.create_proxy()
    backend = dummy_backend.create_proxy(audio=audio)
    core = mopidy_core.Core.start(audio=audio, mixer=mixer,
                                  backends=[backend]).proxy()
    return frontend_lib.ChoosMoosFrontend(config, core)
コード例 #12
0
ファイル: test_mixer.py プロジェクト: mopidy/mopidy
 def setUp(self):  # noqa: N802
     self.mixer = dummy_mixer.create_proxy()
     self.core = core.Core(mixer=self.mixer, backends=[])
コード例 #13
0
 def setUp(self):  # noqa: N802
     self.mixer = dummy_mixer.create_proxy()
     self.core = core.Core(mixer=self.mixer, backends=[])
コード例 #14
0
def mixer():
    actor = dummy_mixer.create_proxy()
    yield actor
    actor.stop()