Re: Can mock.mock_open.read return different values?

2018-03-12 Thread codewizard
On Monday, March 12, 2018 at 4:51:53 AM UTC-4, Tim Golden wrote: > I'm contributing to a codebase which makes heavy use of mock in the test > suite, a technique which I'm aware of but have used only rarely. In one > situation it uses mock.mock_open(read_data="...") and then asserts again >

Can mock.mock_open.read return different values?

2018-03-12 Thread Tim Golden
I'm contributing to a codebase which makes heavy use of mock in the test suite, a technique which I'm aware of but have used only rarely. In one situation it uses mock.mock_open(read_data="...") and then asserts again mock_open.return_value.read.call_count. A code change I've made results in