Exemple #1
0
 def test_process_m4a(self, store, album_art):
     store.expects_call()
     album_art.expects('delay')
     tasks.process_file('*****@*****.**', self.sample_m4a, self.session_key)
     tr = Track.objects.get()
     eq_(tr.email.email, '*****@*****.**')
     eq_(tr.artist, 'Gescom')
     eq_(tr.album, 'Minidisc')
     eq_(tr.track, 'Horse')
     eq_(tr.track_num, 53)
Exemple #2
0
 def test_empty_track_num(self, store, album_art, popen):
     store.is_a_stub()
     album_art.is_a_stub()
     data = StringIO(
         '''{"format": {"tags": {"artist": "",
                                 "album": "",
                                 "title": "",
                                 "track": ""}}}''')
     (popen.expects_call().returns_fake()
                          .provides('wait').returns(0)
                          .has_attr(stdout=data))
     tasks.process_file('*****@*****.**', self.sample_path, self.session_key)
     tr = Track.objects.get()
     eq_(tr.track_num, None)