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'])
评论列表
文章目录