def test_title_form(self): title = self.create_only_terminator() self.assertEquals(title.title, "The Terminator") # There can only be one... with self.assertRaises(forms.ValidationError): imdb_title_getter = IMDBTitlePage() d = imdb_title_getter.get_info(imdb_id=TERMINATOR_IMDB_ID) TitleForm.create_from_data(TERMINATOR_IMDB_ID, d)
def create_only_terminator(self): Film.objects.all().delete() imdb_title_getter = IMDBTitlePage() d = imdb_title_getter.get_info(imdb_id=TERMINATOR_IMDB_ID) return TitleForm.create_from_data(TERMINATOR_IMDB_ID, d)