Beispiel #1
0
 def testWeekDataParsing(self):
     data = tasks._parse_week_artist_data(tasks.week_data('aradnuk', self.requester, 1109505601, 1110110401))
     self.assertEqual(len(data.keys()), 74)
     playcount, artistId = data[data.keys()[0]]
     artist = Artist.objects.get(id=artistId)
     self.assertEqual(playcount, 79)
     self.assertEqual(artist.name, "BT")
Beispiel #2
0
 def testMoreAwkwardXmlRecovery(self):
     data = tasks._parse_week_artist_data(tasks.week_data('Dieg0', self.requester, 1284854400, 1285459200))
     self.assertEqual(len(data.keys()), 1)
     playcount, artistId = data[data.keys()[0]]
     self.assertEqual(playcount, 1)
Beispiel #3
0
 def testAwkwardXmlRecovery(self):
     data = tasks._parse_week_artist_data(tasks.week_data('Eddard_Stark', self.requester, 1175385600, 1175990400))
     self.assertEqual(len(data.keys()), 1)
     playcount, artistId = data[data.keys()[0]]
     self.assertEqual(playcount, 32)