commit | f668d2b775da4bcd07e142c4bc5ebd88165fadf4 | [log] [tgz] |
---|---|---|
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | Tue Sep 17 04:35:56 2019 -0700 |
committer | GitHub <noreply@github.com> | Tue Sep 17 04:35:56 2019 -0700 |
tree | d9abc9d44d2277ad579cd24d7259a24137c9dd0f | |
parent | 728bea60e5ff2bea36f8f9a3cafe6b96e452c211 [diff] |
bpo-37828: Fix default mock_name in unittest.mock.assert_called error (GH-16166) In the format string for assert_called the evaluation order is incorrect and hence for mock's without name, 'None' is printed whereas it should be 'mock' like for other messages. The error message is ("Expected '%s' to have been called." % self._mock_name or 'mock'). (cherry picked from commit 5f5f11faf9de0d8dcbe1a8a4eb35d2a4232d6eaa) Co-authored-by: Abraham Toriz Cruz <awonderfulcode@gmail.com>