Message328378
Sure, consider the following code:
from unittest import mock
m = mock.Mock()
m(1, 3)
m("Test", data=[42])
When I call
m.assert_not_called()
I get the following error message:
AssertionError: Expected 'mock' to not have been called. Called 2 times.
This is what I would like to improve. On the other hand, if I call
m.assert_has_calls(mock.call(3))
I get the following error:
AssertionError: Calls not found.
Expected: ['', (3,), {}]
Actual: [call(1, 3), call('Test', data=[42])]
This is great and may serve as a template for what I want to introduce. |
|
Date |
User |
Action |
Args |
2018-10-24 16:41:40 | Petter S | set | recipients:
+ Petter S, eamanu, xtreak |
2018-10-24 16:41:40 | Petter S | set | messageid: <1540399300.96.0.788709270274.issue35047@psf.upfronthosting.co.za> |
2018-10-24 16:41:40 | Petter S | link | issue35047 messages |
2018-10-24 16:41:40 | Petter S | create | |
|