test_commands.py 文件源码

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

项目:django-elasticsearch-dsl 作者: sabricot 项目源码 文件源码
def test_rebuild_indices_aborted(self):

        with patch.multiple(
            Command, _create=DEFAULT, _delete=DEFAULT, _populate=DEFAULT
        ) as handles:
            handles['_delete'].return_value = False
            call_command('search_index', stdout=self.out, action='rebuild')
            handles['_delete'].assert_called()
            handles['_create'].assert_not_called()
            handles['_populate'].assert_not_called()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号