form = FlickrForm({"source_url": "https://www.flickr.com/photos/rczajka/6941928577/in/photostream"})
self.assertTrue(form.is_valid())
self.assertEqual(form.cleaned_data['source_url'], "https://www.flickr.com/photos/rczajka/6941928577/")
- self.assertEqual(form.cleaned_data['author'], "rczajka@Flickr")
+ self.assertEqual(form.cleaned_data['author'], "Radek Czajka@Flickr")
self.assertEqual(form.cleaned_data['title'], u"Pirate StaĆczyk")
self.assertEqual(form.cleaned_data['license_name'], "CC BY 2.0")
- self.assertEqual(form.cleaned_data['license_url'], "https://creativecommons.org/licenses/by/2.0/deed.en")
- self.assertEqual(form.cleaned_data['download_url'], "https://farm8.staticflickr.com/7069/6941928577_415844c58e_o.jpg")
+ self.assertEqual(form.cleaned_data['license_url'], "https://creativecommons.org/licenses/by/2.0/")
+ self.assertTrue('.staticflickr.com' in form.cleaned_data['download_url'])