facebook / facebook/TestSlide

`and_assert_not_called` shouldn't need any behaviour defined beforehand

未关闭
#315 2 条评论 0 个 reaction 已指派 1 人 已被 @deathowl 认领 在 GitHub 查看
主要语言
Python
星标
149
派生
62
PR 合并指标
30 天内没有已合并 PR

描述

**I'm using `TestSlide` version:** 2.6.3

**Given:**
```python
self.mock_callable(foo, 'bar').and_assert_not_called()
```
should work. I currently need:
```python
self.mock_callable(foo, 'bar').to_return_value(None).and_assert_not_called()
```
but since I don't want it called I don't want any return value defined!!

I know I could simply leave the callable unmocked and let `StrictMock` fail in such an event, but the error message is confusing - I really want it to notify that there is an unwanted call, instead of something I forgot to mock away.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。