Beispiel #1
0
 def save_channel(self, creator, feed_url):
     if Channel.objects.filter(url=feed_url).count():
         raise forms.ValidationError(_("Feed URL already exists"))
     channel = Channel()
     channel.url = feed_url
     channel.owner = creator
     self.update_channel(channel)
     return channel
Beispiel #2
0
 def save_channel(self, creator, feed_url):
     if Channel.objects.filter(url=feed_url).count():
         raise forms.ValidationError(_("Feed URL already exists"))
     channel = Channel()
     channel.url = feed_url
     channel.owner = creator
     self.update_channel(channel)
     return channel
Beispiel #3
0
 def test_thumbnail_before_save(self):
     c = Channel()
     c.url = "http://myblog.com/videos/rss"
     c.website_url = "http://myblog.com/"
     c.publisher = "TestVision"
     c.description = "lots of stuff"
     self.assertRaises(ValueError, c.save_thumbnail,
                       file(test_data_path('thumbnail.jpg')))
Beispiel #4
0
 def test_thumbnail_before_save(self):
     c = Channel()
     c.url = "http://myblog.com/videos/rss"
     c.website_url = "http://myblog.com/"
     c.publisher = "TestVision"
     c.description = "lots of stuff"
     self.assertRaises(ValueError, c.save_thumbnail,
                       file(test_data_path('thumbnail.jpg')))