This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dmitriy.mironiyk
Recipients dmitriy.mironiyk
Date 2021-03-02.14:31:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1614695494.31.0.773020245058.issue43371@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-03-02 14:31:34dmitriy.mironiyksetrecipients: + dmitriy.mironiyk
2021-03-02 14:31:34dmitriy.mironiyksetmessageid: <1614695494.31.0.773020245058.issue43371@roundup.psfhosted.org>
2021-03-02 14:31:34dmitriy.mironiyklinkissue43371 messages
2021-03-02 14:31:34dmitriy.mironiykcreate