test_models.py 文件源码

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

项目:wagtail-filepreviews 作者: filepreviews 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号