Message387932
I think that behavior of Mock.assert_has_calls is misleading.
- When I call Mock.assert_has_calls with any_order=False it checks that expected calls are the same calls as performed on mock and raise an error if mock has some calls other than expected.
- When I call Mock.assert_has_calls with any_order=True it checks that mock has expected calls and not raise an error when mock has other calls than expected.
I suppose should be two separate methods:
- Mock.assert_has_only_calls that always raise an error when mock has calls other than expected(not regarding any_order).
- Mock.assert_has_calls that raise error only when no calls that provided in expected or if order of calls is wrong when any_order=False. |
|
Date |
User |
Action |
Args |
2021-03-02 14:31:34 | dmitriy.mironiyk | set | recipients:
+ dmitriy.mironiyk |
2021-03-02 14:31:34 | dmitriy.mironiyk | set | messageid: <1614695494.31.0.773020245058.issue43371@roundup.psfhosted.org> |
2021-03-02 14:31:34 | dmitriy.mironiyk | link | issue43371 messages |
2021-03-02 14:31:34 | dmitriy.mironiyk | create | |
|