Message246849
From https://github.com/testing-cabal/mock/issues/243
from unittest import mock
mmock = mock.MagicMock()
mmock.foobar("baz")
mmock.assert_has_calls([]) # No exception raised. Why?mmock.assert_has_calls(['x']) # Exception raised as expected.
---
Traceback (most recent call last):
File "tt.py", line 7, in <module>
mmock.assert_has_calls(['x']) # Exception raised as expected.
File "/home/robertc/work/cpython/Lib/unittest/mock.py", line 824, in assert_has_calls
) from cause
AssertionError: Calls not found.
Expected: ['x']
Actual: [call.foobar('baz')] |
|
Date |
User |
Action |
Args |
2015-07-17 09:40:04 | rbcollins | set | recipients:
+ rbcollins |
2015-07-17 09:40:04 | rbcollins | set | messageid: <1437126004.09.0.453747784975.issue24653@psf.upfronthosting.co.za> |
2015-07-17 09:40:04 | rbcollins | link | issue24653 messages |
2015-07-17 09:40:03 | rbcollins | create | |
|