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()
test_commands.py 文件源码
python
阅读 23
收藏 0
点赞 0
评论 0
评论列表
文章目录