本文整理汇总了Python中film20.core.models.Film.imdb_code方法的典型用法代码示例。如果您正苦于以下问题:Python Film.imdb_code方法的具体用法?Python Film.imdb_code怎么用?Python Film.imdb_code使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类film20.core.models.Film
的用法示例。
在下文中一共展示了Film.imdb_code方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_filmindb
# 需要导入模块: from film20.core.models import Film [as 别名]
# 或者: from film20.core.models.Film import imdb_code [as 别名]
def test_filmindb(self):
"""
Test failed fetch movie in db
"""
self.initialize()
self.client.login(username=self.user.username, password='secret')
film_to_import = FilmToImport(user = self.user,
title = 'Elektroniczny Morderca',
imdb_url = 'http://www.imdb.com/title/tt0088247/',
imdb_id='0088247',
status=FilmToImport.ACCEPTED)
film_to_import.save()
film = Film()
film.title = "The Terminator"
film.type = Object.TYPE_FILM
film.imdb_code = "0088247"
film.permalink = "the-terminator"
film.release_year = 1984
film.save()
run(False, False, False, False, False, True, "http")
film_to_import = FilmToImport.objects.get(title = 'Elektroniczny Morderca')
self.assertEqual(film_to_import.attempts, 1)
self.assertEqual(film_to_import.status, FilmToImport.ALREADY_IN_DB)
示例2: initialize
# 需要导入模块: from film20.core.models import Film [as 别名]
# 或者: from film20.core.models.Film import imdb_code [as 别名]
def initialize(self):
self.clean_data()
film = Film()
film.title = "The Terminator"
film.type = Object.TYPE_FILM
film.imdb_code = "0088247"
film.permalink = "the-terminator"
film.release_year = 1984
film.save()
self.film = film