facebook / facebook/TestSlide

`and_assert_not_called` shouldn't need any behaviour defined beforehand

Open
#315 2 comments 0 reactions 1 assignee Claimed by @deathowl View on GitHub
Dominant language
Python
Stars
149
Forks
62
PR merge metrics
No merged PRs in 30d

Description

**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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.