)]}'
{"nova/tests/compute/test_compute_mgr.py":[{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"76a2d9cfee5e5c150e828c385ff18a7c6a8c69e3","unresolved":false,"context_lines":[{"line_number":876,"context_line":"        self.assertFalse(c.cleaned)"},{"line_number":877,"context_line":"        self.assertEqual(\u00271\u0027, c.system_metadata[\u0027clean_attempts\u0027])"},{"line_number":878,"context_line":""},{"line_number":879,"context_line":"    def test_attach_interface_failure(self):"},{"line_number":880,"context_line":"        # Test that the fault methods are invoked when an attach fails"},{"line_number":881,"context_line":"        db_instance \u003d fake_instance.fake_db_instance()"},{"line_number":882,"context_line":"        f_instance \u003d objects.Instance._from_db_object(self.context,"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_1866d3bb","line":879,"updated":"2014-07-17 09:29:14.000000000","message":"Please use mock-decorator, like:\n\nfrom nova.network import api as network_api\n...\n    @mock.patch.object(network_api.API, \u0027allocate_port_for_instance\u0027)\n    @mock.patch.object(compute_utils, \u0027add_instance_fault_from_exc\u0027)\n    def test_attach_interface_failure(self, add_fault, mock_meth):\n        ...","commit_id":"e525054ae6934c08431faafc74d395884d7d016c"},{"author":{"_account_id":8190,"name":"Drew Thorstensen (thorst)","email":"thorst@us.ibm.com","username":"thorst"},"change_message_id":"647714a2438b26c52df6d446c8e993388f97355d","unresolved":false,"context_lines":[{"line_number":876,"context_line":"        self.assertFalse(c.cleaned)"},{"line_number":877,"context_line":"        self.assertEqual(\u00271\u0027, c.system_metadata[\u0027clean_attempts\u0027])"},{"line_number":878,"context_line":""},{"line_number":879,"context_line":"    def test_attach_interface_failure(self):"},{"line_number":880,"context_line":"        # Test that the fault methods are invoked when an attach fails"},{"line_number":881,"context_line":"        db_instance \u003d fake_instance.fake_db_instance()"},{"line_number":882,"context_line":"        f_instance \u003d objects.Instance._from_db_object(self.context,"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_cb1512e7","line":879,"in_reply_to":"baada198_1866d3bb","updated":"2014-07-19 13:47:27.000000000","message":"Thanks Mikhail.  I had some trouble with this because the specific exception that gets thrown must take in an instance object.  So that instance object needs to be built before hand.  Therefore I couldn\u0027t use the mock-decorators at the top of the method.\n\nHowever, I found examples elsewhere in this file that had sub-methods (ex. do_test) that then utilize the decorator.  I followed that pattern for the next change set.","commit_id":"e525054ae6934c08431faafc74d395884d7d016c"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"76a2d9cfee5e5c150e828c385ff18a7c6a8c69e3","unresolved":false,"context_lines":[{"line_number":898,"context_line":"                    mock.call(self.context, f_instance, e,"},{"line_number":899,"context_line":"                              mock.ANY))"},{"line_number":900,"context_line":""},{"line_number":901,"context_line":"    def test_detach_interface_failure(self):"},{"line_number":902,"context_line":"        # Test that the fault methods are invoked when a detach fails"},{"line_number":903,"context_line":""},{"line_number":904,"context_line":"        # Build test data that will cause a PortNotFound exception"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_b8f7a7d3","line":901,"updated":"2014-07-17 09:29:14.000000000","message":"ditto:\nfrom nova.compute import manager as compute_manager\n...\n    @mock.patch.object(compute_manager.ComputeManager,\n                       \u0027_set_instance_error_state\u0027)\n    @mock.patch.object(compute_utils, \u0027add_instance_fault_from_exc\u0027)\n    def test_detach_interface_failure(self, mock_add_fault, mock_error_state):\n        ...","commit_id":"e525054ae6934c08431faafc74d395884d7d016c"},{"author":{"_account_id":8190,"name":"Drew Thorstensen (thorst)","email":"thorst@us.ibm.com","username":"thorst"},"change_message_id":"647714a2438b26c52df6d446c8e993388f97355d","unresolved":false,"context_lines":[{"line_number":898,"context_line":"                    mock.call(self.context, f_instance, e,"},{"line_number":899,"context_line":"                              mock.ANY))"},{"line_number":900,"context_line":""},{"line_number":901,"context_line":"    def test_detach_interface_failure(self):"},{"line_number":902,"context_line":"        # Test that the fault methods are invoked when a detach fails"},{"line_number":903,"context_line":""},{"line_number":904,"context_line":"        # Build test data that will cause a PortNotFound exception"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_eb12d6fb","line":901,"in_reply_to":"baada198_b8f7a7d3","updated":"2014-07-19 13:47:27.000000000","message":"See above comment.","commit_id":"e525054ae6934c08431faafc74d395884d7d016c"}]}
