test_videos.py 文件源码

python
阅读 16 收藏 0 点赞 0 评论 0

项目:videofront 作者: openfun 项目源码 文件源码
def test_get_video_processing_state_started_at_truncated_microseconds(self):
        factories.VideoFactory(public_id='videoid', title="Some title", owner=self.user)
        started_at = datetime(2016, 1, 1, 12, 13, 14, 1516, get_current_timezone())
        models.ProcessingState.objects.filter(video__public_id='videoid').update(started_at=started_at)

        response = self.client.get(reverse('api:v1:video-detail', kwargs={'id': 'videoid'}))
        video = response.json()

        # Check that microseconds are truncated
        self.assertEqual('2016-01-01T12:13:14Z', video['processing']['started_at'])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号