示例#1
0
 def test_changes(self):
     new_video1 = self.video1.copy()
     new_video1 = testobjects.make_mock_daap_item(1001, 'video-item-1',
                                                  u'audio')
     audio3 = testobjects.make_mock_daap_item(2003, 'audio-item-3',
                                              u'audio')
     self.client.set_items([new_video1, self.video2,
                            self.audio1, self.audio2, audio3])
     self.run_client_update()
     self.process_items_changed_messages()
     self.check_list(self.audio1, self.audio2, audio3, new_video1)
示例#2
0
 def test_changes(self):
     new_video1 = self.video1.copy()
     new_video1 = testobjects.make_mock_daap_item(1001, 'video-item-1',
                                                  u'audio')
     audio3 = testobjects.make_mock_daap_item(2003, 'audio-item-3',
                                              u'audio')
     self.client.set_items(
         [new_video1, self.video2, self.audio1, self.audio2, audio3])
     self.run_client_update()
     self.process_items_changed_messages()
     self.check_list(self.audio1, self.audio2, audio3, new_video1)
示例#3
0
 def setup_client(self):
     self.client = testobjects.MockDAAPClient()
     self.video1 = testobjects.make_mock_daap_item(1001, 'video-item-1',
                                                   u'video')
     self.video2 = testobjects.make_mock_daap_item(1002, 'video-item-2',
                                                   u'video')
     self.audio1 = testobjects.make_mock_daap_item(2001, 'audio-item-1',
                                                   u'audio')
     self.audio2 = testobjects.make_mock_daap_item(2002, 'audio-item-2',
                                                   u'audio')
     self.client.set_items([self.video1, self.video2,
                            self.audio1, self.audio2])
示例#4
0
 def setup_client(self):
     self.client = testobjects.MockDAAPClient()
     self.video1 = testobjects.make_mock_daap_item(1001, 'video-item-1',
                                                   u'video')
     self.video2 = testobjects.make_mock_daap_item(1002, 'video-item-2',
                                                   u'video')
     self.audio1 = testobjects.make_mock_daap_item(2001, 'audio-item-1',
                                                   u'audio')
     self.audio2 = testobjects.make_mock_daap_item(2002, 'audio-item-2',
                                                   u'audio')
     self.client.set_items(
         [self.video1, self.video2, self.audio1, self.audio2])
示例#5
0
 def make_daap_items(self, items_dict):
     """Given a dict mapping item ids to item titles, create a dict mapping
     those ids to DAAP items.
     """
     return [
         testobjects.make_mock_daap_item(item_id, title)
         for (item_id, title) in items_dict.items()
     ]
示例#6
0
 def make_daap_items(self, items_dict):
     """Given a dict mapping item ids to item titles, create a dict mapping
     those ids to DAAP items.
     """
     return [testobjects.make_mock_daap_item(item_id, title)
             for (item_id, title) in items_dict.items()]