예제 #1
0
    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)
예제 #2
0
    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)
예제 #3
0
 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)
예제 #4
0
 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)