)]}'
{"ironic/nova/tests/virt/ironic/test_client_wrapper.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6f82a809fbe68b18d44f99e384c1be78dc38b9ec","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        self.icli \u003d client_wrapper.IronicClientWrapper()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    @mock.patch.object(client_wrapper.IronicClientWrapper, \u0027_multi_getattr\u0027)"},{"line_number":37,"context_line":"    @mock.patch.object(client_wrapper.IronicClientWrapper, \u0027_get_client\u0027)"},{"line_number":38,"context_line":"    def test_call_good_no_args(self, mock_get_client, mock_multi_getattr):"},{"line_number":39,"context_line":"        mock_get_client.return_value \u003d FAKE_CLIENT"},{"line_number":40,"context_line":"        self.icli.call(\"node.list\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_2b514962","line":37,"updated":"2014-06-18 11:50:01.000000000","message":"If you happen to create one more versions of patch, could you consider not moving the second decorator? It applies to all tests and should be on class level (will change arguments order for tests though).","commit_id":"7ee36cef8011b62a9025ca6fe20464c4ac3fc0db"}],"ironic/nova/tests/virt/ironic/test_driver.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"2a3f46cf0f11816b37bb0b60da4c8b995e0c046f","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        self.client_wrapper \u003d FakeClientWrapper()"},{"line_number":81,"context_line":"        self.fake_client \u003d fake_wrapper.start()"},{"line_number":82,"context_line":"        self.fake_client.return_value \u003d self.client_wrapper"},{"line_number":83,"context_line":"        self.addCleanup(self.fake_client.stop)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def test_validate_driver_loading(self):"},{"line_number":86,"context_line":"        self.assertIsInstance(self.driver, ironic_driver.IronicDriver)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_16233bbf","line":83,"updated":"2014-06-16 13:13:43.000000000","message":"Please don\u0027t mock like this. We spent a lot of time already to get rid of these vague mocks all over the tests.","commit_id":"82e5ac5ed236d185d0cd0d13ccba71df3e095337"},{"author":{"_account_id":1420,"name":"Adam Gandelman","email":"adamg@ubuntu.com","username":"gandelman-a"},"change_message_id":"6a790e88bc62de1077f2cca24f49bfa9201803c3","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        self.client_wrapper \u003d FakeClientWrapper()"},{"line_number":81,"context_line":"        self.fake_client \u003d fake_wrapper.start()"},{"line_number":82,"context_line":"        self.fake_client.return_value \u003d self.client_wrapper"},{"line_number":83,"context_line":"        self.addCleanup(self.fake_client.stop)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def test_validate_driver_loading(self):"},{"line_number":86,"context_line":"        self.assertIsInstance(self.driver, ironic_driver.IronicDriver)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_f446b04e","line":83,"in_reply_to":"1ae5cdf2_16233bbf","updated":"2014-06-16 23:29:18.000000000","message":"I\u0027m open to suggestions here, I\u0027m not sure a better way TBH. I still see this type of mocking happening elsewhere in the suite.  Something like this still seems better than the super redundant decorator + $mock.return_value used 60+ times.","commit_id":"82e5ac5ed236d185d0cd0d13ccba71df3e095337"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e8e633201600c9a363ebb7d4f2f5b367582a43a5","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        self.client_wrapper \u003d FakeClientWrapper()"},{"line_number":81,"context_line":"        self.fake_client \u003d fake_wrapper.start()"},{"line_number":82,"context_line":"        self.fake_client.return_value \u003d self.client_wrapper"},{"line_number":83,"context_line":"        self.addCleanup(self.fake_client.stop)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def test_validate_driver_loading(self):"},{"line_number":86,"context_line":"        self.assertIsInstance(self.driver, ironic_driver.IronicDriver)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_7f634cdd","line":83,"in_reply_to":"1ae5cdf2_f446b04e","updated":"2014-06-17 08:53:13.000000000","message":"Just this on class level:\n\n @mock.patch.object(cw.IronicClientWrapper, \u0027_get_client\u0027, lambda *_: FAKE_CLIENT)\n class IronicDriverTestCase(test.NoDBTestCase):\n\nthis will apply to all tests, replace with lambda and won\u0027t add new arguments to functions.\n\nThough to me even redundant decorator is better... Have you seen how code looks like when you have \u003e5 of such mocks? Also, we have ongoing patches to completely get rid of this approach.","commit_id":"82e5ac5ed236d185d0cd0d13ccba71df3e095337"}]}
