def test_filepreviews_generate_when_updating_file(self):
setup_mock()
document = PreviewableDocument.objects.create(
title='Test document',
file=ContentFile(b('Hello world'), 'test1.txt')
)
document.file = ContentFile(b('Hello world'), 'test2.txt')
document.save()
self.assertEqual(len(responses.calls), 2)
评论列表
文章目录