)]}'
{"ironic/drivers/modules/pxe.py":[{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"dbd648aa1b303c0397aa780f6966720b2b9aa2ac","unresolved":false,"context_lines":[{"line_number":338,"context_line":"    \"\"\"PXE Deploy Interface for deploy-related actions.\"\"\""},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"    def __init__(self):"},{"line_number":341,"context_line":"        utils.check_dir(directory_to_check\u003dCONF.pxe.tftp_root)"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"    def get_properties(self):"},{"line_number":344,"context_line":"        return COMMON_PROPERTIES"}],"source_content_type":"text/x-python","patch_set":9,"id":"dac4157f_75048c14","line":341,"updated":"2015-04-20 14:16:16.000000000","message":"Seems that http_root should be also checked if ipxe is used.","commit_id":"196e535849aed6600ba14ec1e29230c0a67fe938"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"388a6d46f51edbb38417c85dbc6240e6f3b24111","unresolved":false,"context_lines":[{"line_number":338,"context_line":"    \"\"\"PXE Deploy Interface for deploy-related actions.\"\"\""},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"    def __init__(self):"},{"line_number":341,"context_line":"        utils.check_dir(directory_to_check\u003dCONF.pxe.tftp_root)"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"    def get_properties(self):"},{"line_number":344,"context_line":"        return COMMON_PROPERTIES"}],"source_content_type":"text/x-python","patch_set":9,"id":"dac4157f_f7008eac","line":341,"in_reply_to":"dac4157f_75048c14","updated":"2015-04-20 22:12:27.000000000","message":"Oh Yes, good catch I\u0027ll add that.","commit_id":"196e535849aed6600ba14ec1e29230c0a67fe938"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"380b9114db1b19beaea0207365cd974cbaa5f46d","unresolved":false,"context_lines":[{"line_number":340,"context_line":"    def __init__(self):"},{"line_number":341,"context_line":"        utils.check_dir(directory_to_check\u003dCONF.pxe.tftp_root)"},{"line_number":342,"context_line":"        if CONF.pxe.ipxe_enabled:"},{"line_number":343,"context_line":"            utils.check_dir(directory_to_check\u003dCONF.pxe.http_root)"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"    def get_properties(self):"},{"line_number":346,"context_line":"        return COMMON_PROPERTIES"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf3e73b7_121a887c","line":343,"updated":"2017-08-07 13:58:33.000000000","message":"Does it make sense to call the base class __init__() to guarantee that the base class is properly initialized?","commit_id":"80cd8ecffff188281ff4324685f409d9c0a3a723"}],"ironic/tests/conductor/test_manager.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"26688ec48e2424c36bf7214132b0427e1ee87240","unresolved":false,"context_lines":[{"line_number":3242,"context_line":"        self.assertFalse(mac_update_mock.called)"},{"line_number":3243,"context_line":""},{"line_number":3244,"context_line":""},{"line_number":3245,"context_line":"@mock.patch.object(common_utils, \u0027check_dir\u0027)"},{"line_number":3246,"context_line":"class ManagerTestProperties(tests_db_base.DbTestCase):"},{"line_number":3247,"context_line":""},{"line_number":3248,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"baa041b7_8d6ebf2d","line":3245,"updated":"2015-04-03 11:46:29.000000000","message":"use\n\n @mock.patch.object(common_utils, \u0027check_dir\u0027, lambda d: None)\n\nand you won\u0027t need additional parameter to every test","commit_id":"9c4ce1fc1ec7647d41a2406235ab149d47e8dd2a"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"65eb6aaf26e43cfb94bef2cd761dea760bfb9c2d","unresolved":false,"context_lines":[{"line_number":3242,"context_line":"        self.assertFalse(mac_update_mock.called)"},{"line_number":3243,"context_line":""},{"line_number":3244,"context_line":""},{"line_number":3245,"context_line":"@mock.patch.object(common_utils, \u0027check_dir\u0027)"},{"line_number":3246,"context_line":"class ManagerTestProperties(tests_db_base.DbTestCase):"},{"line_number":3247,"context_line":""},{"line_number":3248,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7aaa499b_e15ae782","line":3245,"in_reply_to":"baa041b7_8d6ebf2d","updated":"2015-04-14 15:07:45.000000000","message":"Done","commit_id":"9c4ce1fc1ec7647d41a2406235ab149d47e8dd2a"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"26688ec48e2424c36bf7214132b0427e1ee87240","unresolved":false,"context_lines":[{"line_number":3256,"context_line":"        properties \u003d self.service.get_driver_properties(self.context, driver)"},{"line_number":3257,"context_line":"        self.assertEqual(sorted(expected), sorted(properties.keys()))"},{"line_number":3258,"context_line":""},{"line_number":3259,"context_line":"    def test_driver_properties_fake(self, mock_commmon_utils):"},{"line_number":3260,"context_line":"        expected \u003d [\u0027A1\u0027, \u0027A2\u0027, \u0027B1\u0027, \u0027B2\u0027]"},{"line_number":3261,"context_line":"        self._check_driver_properties(\"fake\", expected)"},{"line_number":3262,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"baa041b7_2d733317","line":3259,"updated":"2015-04-03 11:46:29.000000000","message":"s/mock_commmon_utils/mock_check_dir/ but see above","commit_id":"9c4ce1fc1ec7647d41a2406235ab149d47e8dd2a"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"65eb6aaf26e43cfb94bef2cd761dea760bfb9c2d","unresolved":false,"context_lines":[{"line_number":3256,"context_line":"        properties \u003d self.service.get_driver_properties(self.context, driver)"},{"line_number":3257,"context_line":"        self.assertEqual(sorted(expected), sorted(properties.keys()))"},{"line_number":3258,"context_line":""},{"line_number":3259,"context_line":"    def test_driver_properties_fake(self, mock_commmon_utils):"},{"line_number":3260,"context_line":"        expected \u003d [\u0027A1\u0027, \u0027A2\u0027, \u0027B1\u0027, \u0027B2\u0027]"},{"line_number":3261,"context_line":"        self._check_driver_properties(\"fake\", expected)"},{"line_number":3262,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7aaa499b_414abbad","line":3259,"in_reply_to":"baa041b7_2d733317","updated":"2015-04-14 15:07:45.000000000","message":"Done","commit_id":"9c4ce1fc1ec7647d41a2406235ab149d47e8dd2a"}],"ironic/tests/drivers/amt/test_vendor.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"26688ec48e2424c36bf7214132b0427e1ee87240","unresolved":false,"context_lines":[{"line_number":32,"context_line":"class AMTPXEVendorPassthruTestCase(db_base.DbTestCase):"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    @mock.patch.object(common_utils, \u0027check_dir\u0027)"},{"line_number":35,"context_line":"    def setUp(self, mock_common_utils):"},{"line_number":36,"context_line":"        super(AMTPXEVendorPassthruTestCase, self).setUp()"},{"line_number":37,"context_line":"        mgr_utils.mock_the_extension_manager(driver\u003d\"pxe_amt\")"},{"line_number":38,"context_line":"        self.node \u003d obj_utils.create_test_node(self.context,"}],"source_content_type":"text/x-python","patch_set":6,"id":"baa041b7_2d4a13ad","line":35,"updated":"2015-04-03 11:46:29.000000000","message":"ditto about useless parameter","commit_id":"9c4ce1fc1ec7647d41a2406235ab149d47e8dd2a"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"65eb6aaf26e43cfb94bef2cd761dea760bfb9c2d","unresolved":false,"context_lines":[{"line_number":32,"context_line":"class AMTPXEVendorPassthruTestCase(db_base.DbTestCase):"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    @mock.patch.object(common_utils, \u0027check_dir\u0027)"},{"line_number":35,"context_line":"    def setUp(self, mock_common_utils):"},{"line_number":36,"context_line":"        super(AMTPXEVendorPassthruTestCase, self).setUp()"},{"line_number":37,"context_line":"        mgr_utils.mock_the_extension_manager(driver\u003d\"pxe_amt\")"},{"line_number":38,"context_line":"        self.node \u003d obj_utils.create_test_node(self.context,"}],"source_content_type":"text/x-python","patch_set":6,"id":"7aaa499b_5a1e2464","line":35,"in_reply_to":"baa041b7_2d4a13ad","updated":"2015-04-14 15:07:45.000000000","message":"Done","commit_id":"9c4ce1fc1ec7647d41a2406235ab149d47e8dd2a"}],"ironic/tests/drivers/ilo/test_deploy.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"26e650ed5ecdaac8357d6d02ef2f9c2953b140dd","unresolved":false,"context_lines":[{"line_number":1087,"context_line":"class IloPXEDeployTestCase(db_base.DbTestCase):"},{"line_number":1088,"context_line":""},{"line_number":1089,"context_line":"    @mock.patch.object(common_utils, \u0027check_dir\u0027)"},{"line_number":1090,"context_line":"    def setUp(self, mock_utils):"},{"line_number":1091,"context_line":"        super(IloPXEDeployTestCase, self).setUp()"},{"line_number":1092,"context_line":"        mgr_utils.mock_the_extension_manager(driver\u003d\"pxe_ilo\")"},{"line_number":1093,"context_line":"        self.node \u003d obj_utils.create_test_node(self.context,"}],"source_content_type":"text/x-python","patch_set":11,"id":"dac4157f_576ff5c4","line":1090,"updated":"2015-04-22 10:43:07.000000000","message":"The mock is not being used.\n\nPerhaps we should mock it at the class level then (with a lambda)","commit_id":"80cd8ecffff188281ff4324685f409d9c0a3a723"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"26e650ed5ecdaac8357d6d02ef2f9c2953b140dd","unresolved":false,"context_lines":[{"line_number":1140,"context_line":"class IloPXEVendorPassthruTestCase(db_base.DbTestCase):"},{"line_number":1141,"context_line":""},{"line_number":1142,"context_line":"    @mock.patch.object(common_utils, \u0027check_dir\u0027)"},{"line_number":1143,"context_line":"    def setUp(self, mock_common_utils):"},{"line_number":1144,"context_line":"        super(IloPXEVendorPassthruTestCase, self).setUp()"},{"line_number":1145,"context_line":"        mgr_utils.mock_the_extension_manager(driver\u003d\"pxe_ilo\")"},{"line_number":1146,"context_line":"        self.node \u003d obj_utils.create_test_node(self.context,"}],"source_content_type":"text/x-python","patch_set":11,"id":"dac4157f_b75e5110","line":1143,"updated":"2015-04-22 10:43:07.000000000","message":"ditto mock is not being used. Better to mock it at the class level then (with a lambda)","commit_id":"80cd8ecffff188281ff4324685f409d9c0a3a723"}],"ironic/tests/drivers/test_deploy_utils.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"26e650ed5ecdaac8357d6d02ef2f9c2953b140dd","unresolved":false,"context_lines":[{"line_number":929,"context_line":"class OtherFunctionTestCase(db_base.DbTestCase):"},{"line_number":930,"context_line":""},{"line_number":931,"context_line":"    @mock.patch.object(common_utils, \u0027check_dir\u0027)"},{"line_number":932,"context_line":"    def setUp(self, mock_common_utils):"},{"line_number":933,"context_line":"        super(OtherFunctionTestCase, self).setUp()"},{"line_number":934,"context_line":"        mgr_utils.mock_the_extension_manager(driver\u003d\"fake_pxe\")"},{"line_number":935,"context_line":"        self.node \u003d obj_utils.create_test_node(self.context, driver\u003d\u0027fake_pxe\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"dac4157f_f7aba9d4","line":932,"updated":"2015-04-22 10:43:07.000000000","message":"ditto re mock not being used","commit_id":"80cd8ecffff188281ff4324685f409d9c0a3a723"}],"ironic/tests/drivers/test_discoverd.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"26e650ed5ecdaac8357d6d02ef2f9c2953b140dd","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        super(DisabledTestCase, self).setUp()"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    @mock.patch.object(common_utils, \u0027check_dir\u0027)"},{"line_number":35,"context_line":"    def _do_mock(self, mock_common_utils):"},{"line_number":36,"context_line":"        # NOTE(dtantsur): fake driver always has inspection, using another one"},{"line_number":37,"context_line":"        mgr_utils.mock_the_extension_manager(\"pxe_ssh\")"},{"line_number":38,"context_line":"        self.driver \u003d driver_factory.get_driver(\"pxe_ssh\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"dac4157f_97834d56","line":35,"updated":"2015-04-22 10:43:07.000000000","message":"ditto re mock not being used","commit_id":"80cd8ecffff188281ff4324685f409d9c0a3a723"}],"ironic/tests/drivers/test_iscsi_deploy.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"26e650ed5ecdaac8357d6d02ef2f9c2953b140dd","unresolved":false,"context_lines":[{"line_number":342,"context_line":"class IscsiDeployPrivateMethodsTestCase(db_base.DbTestCase):"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"    @mock.patch.object(utils, \u0027check_dir\u0027)"},{"line_number":345,"context_line":"    def setUp(self, mock_utils):"},{"line_number":346,"context_line":"        super(IscsiDeployPrivateMethodsTestCase, self).setUp()"},{"line_number":347,"context_line":"        n \u003d {"},{"line_number":348,"context_line":"              \u0027driver\u0027: \u0027fake_pxe\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"dac4157f_37800146","line":345,"updated":"2015-04-22 10:43:07.000000000","message":"ditto re mock not being used","commit_id":"80cd8ecffff188281ff4324685f409d9c0a3a723"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"26e650ed5ecdaac8357d6d02ef2f9c2953b140dd","unresolved":false,"context_lines":[{"line_number":368,"context_line":"class IscsiDeployMethodsTestCase(db_base.DbTestCase):"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"    @mock.patch.object(utils, \u0027check_dir\u0027)"},{"line_number":371,"context_line":"    def setUp(self, mock_utils):"},{"line_number":372,"context_line":"        super(IscsiDeployMethodsTestCase, self).setUp()"},{"line_number":373,"context_line":"        instance_info \u003d dict(INST_INFO_DICT)"},{"line_number":374,"context_line":"        instance_info[\u0027deploy_key\u0027] \u003d \u0027fake-56789\u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"dac4157f_17985dbf","line":371,"updated":"2015-04-22 10:43:07.000000000","message":"ditto re mock not being used","commit_id":"80cd8ecffff188281ff4324685f409d9c0a3a723"}],"ironic/tests/drivers/test_pxe.py":[{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"b977137f1c2fb117168ca089759610fb56a0ed6c","unresolved":false,"context_lines":[{"line_number":490,"context_line":"        open(token_path, \u0027w\u0027).close()"},{"line_number":491,"context_line":"        return token_path"},{"line_number":492,"context_line":""},{"line_number":493,"context_line":"    @mock.patch.object(utils, \u0027check_dir\u0027)"},{"line_number":494,"context_line":"    def test_init_calls_no_ipxe(self, mock_check_dir):"},{"line_number":495,"context_line":"        mock_check_dir.return_value \u003d None"},{"line_number":496,"context_line":"        tftp_dir \u003d CONF.pxe.tftp_root"}],"source_content_type":"text/x-python","patch_set":11,"id":"dac4157f_350c6b3a","line":493,"updated":"2015-04-22 16:23:11.000000000","message":"Maybe add autospec\u003dTrue","commit_id":"80cd8ecffff188281ff4324685f409d9c0a3a723"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"26e650ed5ecdaac8357d6d02ef2f9c2953b140dd","unresolved":false,"context_lines":[{"line_number":502,"context_line":"        self.config(ipxe_enabled\u003dTrue, group\u003d\u0027pxe\u0027)"},{"line_number":503,"context_line":"        mock_check_dir.return_value \u003d None"},{"line_number":504,"context_line":"        pxe.PXEDeploy()"},{"line_number":505,"context_line":"        mock_check_dir.assertTrue(2, mock_check_dir.call_count)"},{"line_number":506,"context_line":""},{"line_number":507,"context_line":"    def test_get_properties(self):"},{"line_number":508,"context_line":"        expected \u003d pxe.COMMON_PROPERTIES"}],"source_content_type":"text/x-python","patch_set":11,"id":"dac4157f_77d43946","line":505,"updated":"2015-04-22 10:43:07.000000000","message":"s/assertTrue/assertEqual\n\nBetter than check the number of calls, we should make sure we are passing the right config option for each call, the test should look like:\n\n self.config(tftp_root\u003d/fake-tftp-root, group\u003d\u0027pxe\u0027)\n self.config(http_root\u003d/fake-tttp-root, group\u003d\u0027pxe\u0027)\n\n ...\n\n expected_calls \u003d [mock.call(\u0027/fake-tftp-root\u0027), mock.call(\u0027/fake-http-root\u0027)]\n mock_check_dir.assert_has_calls(expected_calls)","commit_id":"80cd8ecffff188281ff4324685f409d9c0a3a723"}]}
