Activity log for bug #1336766

Date Who What changed Old value New value Message
2014-07-02 12:14:01 Pavlo Shchelokovskyy bug added bug
2014-07-02 12:14:09 Pavlo Shchelokovskyy heat: assignee Pavlo Shchelokovskyy (pshchelo)
2014-07-02 12:28:34 Pavlo Shchelokovskyy description Some unit tests suit use the following assertion on mock objects returned by mock.Mock / mock.MagicMock classes: mocked.assert_called_once() This is wrong, as the mock object has only methods assert_called_with() and assert_called_once_with() [1]. Any other method access not defined as mock interface will simply pass/return another mock.Mock object, so those assertions in unit tests are not actually checking anything as they do never raise any error. The correct usage (if one cares only about call count and not arguments) is self.assertEqual(1, mocked.call_count) [1] http://www.voidspace.org.uk/python/mock/mock.html Some unit tests use the following assertion on mock objects returned by mock.Mock / mock.MagicMock classes: mocked.assert_called_once() This is wrong, as the mock object has only methods assert_called_with() and assert_called_once_with() [1]. Any other method access not defined as mock interface will simply pass/return another mock.Mock object, so those assertions in unit tests are not actually checking anything as they do never raise any error. The correct usage (if one cares only about call count and not arguments) is self.assertEqual(1, mocked.call_count) [1] http://www.voidspace.org.uk/python/mock/mock.html
2014-07-02 13:14:24 OpenStack Infra heat: status New In Progress
2014-07-02 15:40:20 OpenStack Infra heat: status In Progress Fix Committed
2014-07-23 16:03:18 Russell Bryant heat: status Fix Committed Fix Released
2014-07-23 16:03:18 Russell Bryant heat: milestone juno-2
2014-10-16 09:49:05 Thierry Carrez heat: milestone juno-2 2014.2