)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"4e00ad2cacfc2a614bd374054ecb1a8cca90d6e7","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Cleanup unit tests for ipmittool"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"By having a mock patch on the testcase class it was requiring 40+"},{"line_number":10,"context_line":"functions to have \u0027mock_sleep\u0027 in their argument list. When we are"},{"line_number":11,"context_line":"only checking the value about five times. Instead put it into the"},{"line_number":12,"context_line":"setUp() function."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7f515b1d_ee2041fa","line":10,"updated":"2017-09-22 11:34:34.000000000","message":"usually it\u0027s a sign that the test case has to be split. have you considered that?","commit_id":"f309730572ce4de864bb390a37559a6fe1546afc"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"48fb78dfe6ef2040eaaf14d7a11e7473c92231ef","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Cleanup unit tests for ipmittool"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"By having a mock patch on the testcase class it was requiring 40+"},{"line_number":10,"context_line":"functions to have \u0027mock_sleep\u0027 in their argument list. When we are"},{"line_number":11,"context_line":"only checking the value about five times. Instead put it into the"},{"line_number":12,"context_line":"setUp() function."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7f515b1d_312119b6","line":10,"in_reply_to":"7f515b1d_ee2041fa","updated":"2017-09-22 14:06:33.000000000","message":"That is a bigger job then I want to take on at this point.","commit_id":"f309730572ce4de864bb390a37559a6fe1546afc"}],"ironic/tests/unit/drivers/modules/test_ipmitool.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"4e00ad2cacfc2a614bd374054ecb1a8cca90d6e7","unresolved":false,"context_lines":[{"line_number":356,"context_line":""},{"line_number":357,"context_line":"        patcher \u003d mock.patch.object(time, \u0027sleep\u0027, autospec\u003dTrue)"},{"line_number":358,"context_line":"        self.addCleanup(patcher.stop)"},{"line_number":359,"context_line":"        self.mock_sleep \u003d patcher.start()"},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"    def _mock_system_random_distribution(self):"},{"line_number":362,"context_line":"        # random.SystemRandom with gauss distribution is used by oslo_service\u0027s"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_ce1d85be","line":359,"updated":"2017-09-22 11:34:34.000000000","message":"please use fixtures instead of this","commit_id":"f309730572ce4de864bb390a37559a6fe1546afc"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"6cb1e97fef9a24ce2fd61cdf9cd7082e7b9acbb7","unresolved":false,"context_lines":[{"line_number":356,"context_line":""},{"line_number":357,"context_line":"        patcher \u003d mock.patch.object(time, \u0027sleep\u0027, autospec\u003dTrue)"},{"line_number":358,"context_line":"        self.addCleanup(patcher.stop)"},{"line_number":359,"context_line":"        self.mock_sleep \u003d patcher.start()"},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"    def _mock_system_random_distribution(self):"},{"line_number":362,"context_line":"        # random.SystemRandom with gauss distribution is used by oslo_service\u0027s"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_ae2b3480","line":359,"in_reply_to":"7f515b1d_340fc72f","updated":"2017-09-25 17:15:23.000000000","message":"I tried this:\n\n        mock_sleep_fixture \u003d self.useFixture(\n            fixtures.MockPatchObject(time, \u0027sleep\u0027, autospec\u003dTrue))\n        self.mock_sleep \u003d mock_sleep_fixture\n\nAnd got errors like this:\n\n ironic.tests.unit.drivers.modules.test_ipmitool.IPMIToolPrivateMethodTestCase.test__exec_ipmitool_second_call_to_address_no_sleep\n ---------------------------------------------------------------------------------------------------------------------------------\n\n Captured traceback:\n ~~~~~~~~~~~~~~~~~~~\n    b\u0027Traceback (most recent call last):\u0027\n    b\u0027  File \"/home/jlvillal/openstack/ironic/.tox/py36/lib/python3.6/site-packages/mock/mock.py\", line 1305, in patched\u0027\n    b\u0027    return func(*args, **keywargs)\u0027\n    b\u0027  File \"/home/jlvillal/openstack/ironic/ironic/tests/unit/drivers/modules/test_ipmitool.py\", line 788, in test__exec_ipmitool_second_call_to_address_no_sleep\u0027\n    b\u0027    self.assertFalse(self.mock_sleep.called)\u0027\n    b\"AttributeError: \u0027MockPatchObject\u0027 object has no attribute \u0027called\u0027\"\n    b\u0027\u0027","commit_id":"f309730572ce4de864bb390a37559a6fe1546afc"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"7de3f44a03478e3bdf1ec6eb0239b578c8501b7a","unresolved":false,"context_lines":[{"line_number":356,"context_line":""},{"line_number":357,"context_line":"        patcher \u003d mock.patch.object(time, \u0027sleep\u0027, autospec\u003dTrue)"},{"line_number":358,"context_line":"        self.addCleanup(patcher.stop)"},{"line_number":359,"context_line":"        self.mock_sleep \u003d patcher.start()"},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"    def _mock_system_random_distribution(self):"},{"line_number":362,"context_line":"        # random.SystemRandom with gauss distribution is used by oslo_service\u0027s"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_da8aaa19","line":359,"in_reply_to":"7f515b1d_8444d71c","updated":"2017-09-25 19:30:39.000000000","message":"Awesome. Thanks. That fixed it.","commit_id":"f309730572ce4de864bb390a37559a6fe1546afc"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"42a3dae87a6f46599ad356d2d52cd9d73103c42e","unresolved":false,"context_lines":[{"line_number":356,"context_line":""},{"line_number":357,"context_line":"        patcher \u003d mock.patch.object(time, \u0027sleep\u0027, autospec\u003dTrue)"},{"line_number":358,"context_line":"        self.addCleanup(patcher.stop)"},{"line_number":359,"context_line":"        self.mock_sleep \u003d patcher.start()"},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"    def _mock_system_random_distribution(self):"},{"line_number":362,"context_line":"        # random.SystemRandom with gauss distribution is used by oslo_service\u0027s"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_8444d71c","line":359,"in_reply_to":"7f515b1d_ae2b3480","updated":"2017-09-25 18:23:35.000000000","message":"a small typo:\n\n -self.mock_sleep \u003d mock_sleep_fixture\n +self.mock_sleep \u003d mock_sleep_fixture.mock","commit_id":"f309730572ce4de864bb390a37559a6fe1546afc"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"48fb78dfe6ef2040eaaf14d7a11e7473c92231ef","unresolved":false,"context_lines":[{"line_number":356,"context_line":""},{"line_number":357,"context_line":"        patcher \u003d mock.patch.object(time, \u0027sleep\u0027, autospec\u003dTrue)"},{"line_number":358,"context_line":"        self.addCleanup(patcher.stop)"},{"line_number":359,"context_line":"        self.mock_sleep \u003d patcher.start()"},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"    def _mock_system_random_distribution(self):"},{"line_number":362,"context_line":"        # random.SystemRandom with gauss distribution is used by oslo_service\u0027s"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_340fc72f","line":359,"in_reply_to":"7f515b1d_ce1d85be","updated":"2017-09-22 14:06:33.000000000","message":"Can you give more details? I don\u0027t see any pre-made fixture that handles this.\n\nhttps://pypi.python.org/pypi/fixtures","commit_id":"f309730572ce4de864bb390a37559a6fe1546afc"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"f2d2010b074de44f6f92def52d80d2f8e7f3ee4e","unresolved":false,"context_lines":[{"line_number":625,"context_line":"                             mock_support.call_args)"},{"line_number":626,"context_line":""},{"line_number":627,"context_line":"    def test__parse_driver_info_numeric_password("},{"line_number":628,"context_line":"            self):"},{"line_number":629,"context_line":"        # ipmi_password must not be converted to int / float"},{"line_number":630,"context_line":"        # even if it includes just numbers."},{"line_number":631,"context_line":"        info \u003d dict(INFO_DICT)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f515b1d_9d4dfb9b","line":628,"updated":"2017-09-27 22:40:31.000000000","message":"I suspect you could have combined the two lines above :-)","commit_id":"43fbc5dc6a22787d0909ab6b47e7b00b70c9c1ca"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"f2d2010b074de44f6f92def52d80d2f8e7f3ee4e","unresolved":false,"context_lines":[{"line_number":1011,"context_line":"        mock_exec.assert_called_once_with(*args)"},{"line_number":1012,"context_line":""},{"line_number":1013,"context_line":"    @mock.patch.object(ipmi, \u0027_is_option_supported\u0027, autospec\u003dTrue)"},{"line_number":1014,"context_line":"    @mock.patch.object(ipmi, \u0027_make_password_file\u0027, _make_password_file_stub)"},{"line_number":1015,"context_line":"    @mock.patch.object(utils, \u0027execute\u0027, autospec\u003dTrue)"},{"line_number":1016,"context_line":"    def test__exec_ipmitool_with_single_bridging(self,"},{"line_number":1017,"context_line":"                                                 mock_exec,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f515b1d_c0c38656","line":1014,"updated":"2017-09-27 22:40:31.000000000","message":"makes me wonder if we should move this to the top or bottom of the list of mocks, seems odd to have it in the middle","commit_id":"43fbc5dc6a22787d0909ab6b47e7b00b70c9c1ca"}]}
