Exemple #1
0
    def setUp(self):
        self.backend = dummy.create_dummy_backend_proxy()
        self.core = core.Core.start(backends=[self.backend]).proxy()

        self.connection = MockConnection()
        self.session = session.MpdSession(
            self.connection, config=self.get_config(), core=self.core)
        self.dispatcher = self.session.dispatcher
        self.context = self.dispatcher.context
Exemple #2
0
 def setUp(self):
     config = {
         'mpd': {
             'password': None,
         }
     }
     self.backend = dummy.create_dummy_backend_proxy()
     self.core = core.Core.start(backends=[self.backend]).proxy()
     self.dispatcher = MpdDispatcher(config=config)
Exemple #3
0
    def setUp(self):
        self.backend = dummy.create_dummy_backend_proxy()
        self.core = core.Core.start(backends=[self.backend]).proxy()

        self.connection = MockConnection()
        self.session = session.MpdSession(
            self.connection, config=self.get_config(), core=self.core)
        self.dispatcher = self.session.dispatcher
        self.context = self.dispatcher.context
    def setUp(self):
        config = {
            'mpris': {
                'desktop_file': '/tmp/foo.desktop',
            }
        }

        objects.exit_process = mock.Mock()
        objects.MprisObject._connect_to_dbus = mock.Mock()
        self.backend = dummy.create_dummy_backend_proxy()
        self.core = core.Core.start(backends=[self.backend]).proxy()
        self.mpris = objects.MprisObject(config=config, core=self.core)
Exemple #5
0
    def setUp(self):
        self.backend = dummy.create_dummy_backend_proxy()
        self.core = core.Core.start(backends=[self.backend]).proxy()

        self.jrw = jsonrpc.JsonRpcWrapper(
            objects={
                'hello': lambda: 'Hello, world!',
                'calc': Calculator(),
                'core': self.core,
                'core.playback': self.core.playback,
                'core.tracklist': self.core.tracklist,
                'get_uri_schemes': self.core.get_uri_schemes,
            },
            encoders=[models.ModelJSONEncoder],
            decoders=[models.model_json_decoder])
    def setUp(self):
        objects.MprisObject._connect_to_dbus = mock.Mock()
        self.backend = dummy.create_dummy_backend_proxy()
        self.core = core.Core.start(backends=[self.backend]).proxy()
        self.mpris = objects.MprisObject(config={}, core=self.core)

        foo = self.core.playlists.create('foo').get()
        foo = foo.copy(last_modified=datetime.datetime(2012, 3, 1, 6, 0, 0))
        foo = self.core.playlists.save(foo).get()

        bar = self.core.playlists.create('bar').get()
        bar = bar.copy(last_modified=datetime.datetime(2012, 2, 1, 6, 0, 0))
        bar = self.core.playlists.save(bar).get()

        baz = self.core.playlists.create('baz').get()
        baz = baz.copy(last_modified=datetime.datetime(2012, 1, 1, 6, 0, 0))
        baz = self.core.playlists.save(baz).get()
        self.playlist = baz
    def setUp(self):
        objects.MprisObject._connect_to_dbus = mock.Mock()
        self.backend = dummy.create_dummy_backend_proxy()
        self.core = core.Core.start(backends=[self.backend]).proxy()
        self.mpris = objects.MprisObject(config={}, core=self.core)

        foo = self.core.playlists.create('foo').get()
        foo = foo.copy(last_modified=datetime.datetime(2012, 3, 1, 6, 0, 0))
        foo = self.core.playlists.save(foo).get()

        bar = self.core.playlists.create('bar').get()
        bar = bar.copy(last_modified=datetime.datetime(2012, 2, 1, 6, 0, 0))
        bar = self.core.playlists.save(bar).get()

        baz = self.core.playlists.create('baz').get()
        baz = baz.copy(last_modified=datetime.datetime(2012, 1, 1, 6, 0, 0))
        baz = self.core.playlists.save(baz).get()
        self.playlist = baz
Exemple #8
0
    def setUp(self):
        self.backend = dummy.create_dummy_backend_proxy()
        self.core = core.Core.start(backends=[self.backend]).proxy()

        self.jrw = jsonrpc.JsonRpcWrapper(objects={
            'hello':
            lambda: 'Hello, world!',
            'calc':
            Calculator(),
            'core':
            self.core,
            'core.playback':
            self.core.playback,
            'core.tracklist':
            self.core.tracklist,
            'get_uri_schemes':
            self.core.get_uri_schemes,
        },
                                          encoders=[models.ModelJSONEncoder],
                                          decoders=[models.model_json_decoder])
Exemple #9
0
 def setUp(self):
     self.backend = dummy.create_dummy_backend_proxy()
     self.core = core.Core.start(backends=[self.backend]).proxy()
 def setUp(self):
     objects.MprisObject._connect_to_dbus = mock.Mock()
     self.backend = dummy.create_dummy_backend_proxy()
     self.core = core.Core.start(backends=[self.backend]).proxy()
     self.mpris = objects.MprisObject(config={}, core=self.core)
Exemple #11
0
 def setUp(self):
     self.backend = dummy.create_dummy_backend_proxy()
     self.core = core.Core.start(backends=[self.backend]).proxy()
     self.dispatcher = dispatcher.MpdDispatcher(core=self.core)
     self.context = self.dispatcher.context
Exemple #12
0
 def setUp(self):
     self.backend = dummy.create_dummy_backend_proxy()
     self.core = core.Core.start(backends=[self.backend]).proxy()
Exemple #13
0
 def setUp(self):
     self.backend = dummy.create_dummy_backend_proxy()
     self.core = core.Core.start(backends=[self.backend]).proxy()
     self.dispatcher = dispatcher.MpdDispatcher(core=self.core)
     self.context = self.dispatcher.context
Exemple #14
0
 def setUp(self):
     objects.MprisObject._connect_to_dbus = mock.Mock()
     self.backend = dummy.create_dummy_backend_proxy()
     self.core = core.Core.start(backends=[self.backend]).proxy()
     self.mpris = objects.MprisObject(config={}, core=self.core)