Exemplo n.º 1
0
 def get_context_data(self, **kwargs):
    context = super(StationUploadView, self).get_context_data(**kwargs) 
    station_id =  self.request.get_full_path().split('/')[3]
    station = Station.objects.get(id=station_id)
    importer = PandoraStationImporter()
    importer.add(Song.objects.filter(station=station))
    
    return context 
Exemplo n.º 2
0
 def test_song_import(self):
   self.assertTrue(len(self.test_songs) > 0)
   uploader = PandoraStationImporter()
   uploader.add(self.test_songs,location='test/music/')