)]}'
{"nova/tests/unit/virt/hyperv/test_base.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"54e53470f262a22e1ad1cfaa3187ed69a519c181","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        self._mock_wmi \u003d mock.MagicMock()"},{"line_number":29,"context_line":"        wmi_patcher \u003d mock.patch.object(builtins, \u0027wmi\u0027, create\u003dTrue,"},{"line_number":30,"context_line":"                                        new\u003dself._mock_wmi)"},{"line_number":31,"context_line":"        platform_patcher \u003d mock.patch(\u0027sys.platform\u0027, \u0027win32\u0027)"},{"line_number":32,"context_line":"        utilsfactory_patcher \u003d mock.patch.object(utilsfactory, \u0027_get_class\u0027)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"        platform_patcher.start()"}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_a1909396","side":"PARENT","line":31,"updated":"2016-07-11 00:15:59.000000000","message":"Why is this removed?","commit_id":"e1b8a1e4bfd6224e12d2b756a8a8ac9fb74c780e"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"be11e5018797395bd7ed544d87b24be370531e61","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        self._mock_wmi \u003d mock.MagicMock()"},{"line_number":29,"context_line":"        wmi_patcher \u003d mock.patch.object(builtins, \u0027wmi\u0027, create\u003dTrue,"},{"line_number":30,"context_line":"                                        new\u003dself._mock_wmi)"},{"line_number":31,"context_line":"        platform_patcher \u003d mock.patch(\u0027sys.platform\u0027, \u0027win32\u0027)"},{"line_number":32,"context_line":"        utilsfactory_patcher \u003d mock.patch.object(utilsfactory, \u0027_get_class\u0027)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"        platform_patcher.start()"}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_deb3d14b","side":"PARENT","line":31,"in_reply_to":"1aa78d24_a1909396","updated":"2016-07-11 17:14:17.000000000","message":"with this change, we actually import os-win modules (importing was done in _get_class, which was mocked), and some of the modules have Windows specific imports (wmi, ctypes, etc.)\n\nThe imports are conditional:\n\n    if sys.platform \u003d\u003d \u0027win32\u0027:\n        import wmi\n\nSo, without this, we\u0027d have import errors while running tests on ther OS types.","commit_id":"e1b8a1e4bfd6224e12d2b756a8a8ac9fb74c780e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"54e53470f262a22e1ad1cfaa3187ed69a519c181","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        self._mock_wmi \u003d mock.MagicMock()"},{"line_number":33,"context_line":"        wmi_patcher \u003d mock.patch.object(builtins, \u0027wmi\u0027, create\u003dTrue,"},{"line_number":34,"context_line":"                                        new\u003dself._mock_wmi)"},{"line_number":35,"context_line":"        utilsfactory_patcher \u003d mock.patch.object("},{"line_number":36,"context_line":"            utilsfactory, \u0027_get_class\u0027, HyperVBaseTestCase._mock_get_class)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        wmi_patcher.start()"},{"line_number":39,"context_line":"        utilsfactory_patcher.start()"}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_4191ef99","line":36,"range":{"start_line":35,"start_character":8,"end_line":36,"end_character":75},"updated":"2016-07-11 00:15:59.000000000","message":"Just a thought, but maybe do this from setUpClass?","commit_id":"3aed27ea53c33a9f77790903845a025aa75ef73f"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"be11e5018797395bd7ed544d87b24be370531e61","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        self._mock_wmi \u003d mock.MagicMock()"},{"line_number":33,"context_line":"        wmi_patcher \u003d mock.patch.object(builtins, \u0027wmi\u0027, create\u003dTrue,"},{"line_number":34,"context_line":"                                        new\u003dself._mock_wmi)"},{"line_number":35,"context_line":"        utilsfactory_patcher \u003d mock.patch.object("},{"line_number":36,"context_line":"            utilsfactory, \u0027_get_class\u0027, HyperVBaseTestCase._mock_get_class)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        wmi_patcher.start()"},{"line_number":39,"context_line":"        utilsfactory_patcher.start()"}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_5b6ff3fb","line":36,"range":{"start_line":35,"start_character":8,"end_line":36,"end_character":75},"in_reply_to":"1aa78d24_4191ef99","updated":"2016-07-11 17:14:17.000000000","message":"Done","commit_id":"3aed27ea53c33a9f77790903845a025aa75ef73f"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"480dffbd7681dfc562381f4b2470c18ac2a77d0c","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        # _mock_check_sig is called by the mock\u0027s __call__ method."},{"line_number":61,"context_line":"        # which means that if a method is not called, _autospeced is not"},{"line_number":62,"context_line":"        # called."},{"line_number":63,"context_line":"        mocked_method._mock_check_sig \u003d _autospeced"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"class HyperVBaseTestCase(test.NoDBTestCase):"}],"source_content_type":"text/x-python","patch_set":5,"id":"1aa78d24_f40e298b","line":63,"updated":"2016-07-13 19:59:10.000000000","message":"maybe I could just overwrite __call__ instead of __getattr__, so I won\u0027t have to overwrite a private method.","commit_id":"b30004c81273fdcb1c3cdf98ce2d9a71787bcd39"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"1bebd88c238fb34477f3fd519702b4aff3333ccc","unresolved":false,"context_lines":[{"line_number":58,"context_line":"            _lazy_autospec \u003d mock.create_autospec(original_method)"},{"line_number":59,"context_line":"            # consume self argument."},{"line_number":60,"context_line":"            _lazy_autospec \u003d functools.partial(_lazy_autospec, None)"},{"line_number":61,"context_line":"            _lazy_autospec(*args, **kwargs)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        # _mock_check_sig is called by the mock\u0027s __call__ method."},{"line_number":64,"context_line":"        # which means that if a method is not called, _autospeced is not"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a8bc5a2_153bbfec","line":61,"updated":"2016-09-22 10:10:35.000000000","message":"I\u0027m not sure this will handle static methods properly- I\u0027m not sure it won\u0027t either; just flagging it since. The overhaul we did of MonkeyPatch left me a little scarred in this area :).","commit_id":"361fbbabe87bc64bd03d642dbf0bad4154c4e52d"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"859ac40601d644971ff1b35f45cf4a5143dad207","unresolved":false,"context_lines":[{"line_number":58,"context_line":"            _lazy_autospec \u003d mock.create_autospec(original_method)"},{"line_number":59,"context_line":"            # consume self argument."},{"line_number":60,"context_line":"            _lazy_autospec \u003d functools.partial(_lazy_autospec, None)"},{"line_number":61,"context_line":"            _lazy_autospec(*args, **kwargs)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        # _mock_check_sig is called by the mock\u0027s __call__ method."},{"line_number":64,"context_line":"        # which means that if a method is not called, _autospeced is not"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a8bc5a2_6b3fbf25","line":61,"in_reply_to":"5a8bc5a2_153bbfec","updated":"2016-09-22 10:54:40.000000000","message":"yeah, that\u0027s a good point. static methods don\u0027t have a self / cls arg, so there can even be a no arg method.","commit_id":"361fbbabe87bc64bd03d642dbf0bad4154c4e52d"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"1bebd88c238fb34477f3fd519702b4aff3333ccc","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        cls._wmi_patcher.stop()"},{"line_number":87,"context_line":"        cls._utilsfactory_patcher.stop()"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        super(HyperVBaseTestCase, cls).tearDownClass()"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    @staticmethod"},{"line_number":92,"context_line":"    def _mock_get_class(class_type):"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a8bc5a2_d05de5ed","line":89,"updated":"2016-09-22 10:10:35.000000000","message":"tearDown\u0027s are not guaranteed to run - its much much better to use addCleanup, or if you need to optimise some actions across tests use TestResources and a resources\u003d statement.","commit_id":"361fbbabe87bc64bd03d642dbf0bad4154c4e52d"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"859ac40601d644971ff1b35f45cf4a5143dad207","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        cls._wmi_patcher.stop()"},{"line_number":87,"context_line":"        cls._utilsfactory_patcher.stop()"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        super(HyperVBaseTestCase, cls).tearDownClass()"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    @staticmethod"},{"line_number":92,"context_line":"    def _mock_get_class(class_type):"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a8bc5a2_4bd683c6","line":89,"in_reply_to":"5a8bc5a2_d05de5ed","updated":"2016-09-22 10:54:40.000000000","message":"yeah, that\u0027s what i\u0027d typically use, but addCleanup is not a classmethod, which means that i can\u0027t use it in setUpClass.","commit_id":"361fbbabe87bc64bd03d642dbf0bad4154c4e52d"}]}
