本文整理汇总了Python中models.Video.video_h264方法的典型用法代码示例。如果您正苦于以下问题:Python Video.video_h264方法的具体用法?Python Video.video_h264怎么用?Python Video.video_h264使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类models.Video
的用法示例。
在下文中一共展示了Video.video_h264方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_model_video_url
# 需要导入模块: from models import Video [as 别名]
# 或者: from models.Video import video_h264 [as 别名]
def test_model_video_url(self):
video = Video(title="I is title",description="i is desc")
video.video_h264 = "h264.mp4"
video.video_webm = "webm.webm"
video.save()
self.assertEqual("/media/episode-%s/%s" % (video.id, "h264.mp4"), video.h264)
self.assertEqual("/media/episode-%s/%s" % (video.id, "webm.webm"), video.webm)
示例2: test_model_fields
# 需要导入模块: from models import Video [as 别名]
# 或者: from models.Video import video_h264 [as 别名]
def test_model_fields(self):
video = Video()
video.title = "The Title"
video.slug = "the-title"
video.thumbnail_image = "thumbnail.jpg"
video.preview_image = "preview.jpg"
video.description = "long description here"
video.show_notes = "show notes here"
video.video_h264 = "video.mp4"
video.video_webm = "video.webm"
video.length = 12
video.episode = 1
video.publish_date = now()
video.is_premium = False
video.price = 105.00
video.save()
self.assertEqual(video, Video.objects.get(title__exact="The Title"))