)]}'
{"trove/tests/unittests/taskmanager/test_api.py":[{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"238f02cab37fb5ebf06147253a73e15aafdda2f5","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from mock import Mock, patch"},{"line_number":17,"context_line":"from testtools import TestCase"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import trove.common.context as context"},{"line_number":20,"context_line":"from trove.common import exception"},{"line_number":21,"context_line":"from trove.common.strategies.cluster.experimental.mongodb.taskmanager import ("},{"line_number":22,"context_line":"    MongoDbTaskManagerAPI)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_31ff10ac","line":19,"updated":"2015-05-01 22:03:39.000000000","message":"why not make this import statement consistent with others: from trove.common import context as context","commit_id":"b0e65e9ada9472b1fa20827f403e33c5bc1bcbc3"},{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"238f02cab37fb5ebf06147253a73e15aafdda2f5","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"RPC_API_VERSION \u003d \u00271.0\u0027"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class ApiTest(TestCase):"},{"line_number":32,"context_line":"    @patch.object(rpc, \u0027get_client\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_b84c1c43","line":29,"updated":"2015-05-01 22:03:39.000000000","message":"Should use the RPC_API_VERSION from trove.common.rpc.verison.","commit_id":"b0e65e9ada9472b1fa20827f403e33c5bc1bcbc3"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"08f5bec71c38e34b0b3370ca06ee9dd35b3a6472","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"RPC_API_VERSION \u003d \u00271.0\u0027"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class ApiTest(TestCase):"},{"line_number":32,"context_line":"    @patch.object(rpc, \u0027get_client\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_2c15553f","line":29,"in_reply_to":"3acd31a7_46ce30b5","updated":"2015-05-04 15:14:31.000000000","message":"@Morgan: I too was thinking on same lines, but then I updated in patchset 2 just because it was currently 1.0 :)\n\nNP","commit_id":"b0e65e9ada9472b1fa20827f403e33c5bc1bcbc3"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"0e7d84f5e39daaaa1b5f8991c7f9f2c392eea485","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"RPC_API_VERSION \u003d \u00271.0\u0027"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class ApiTest(TestCase):"},{"line_number":32,"context_line":"    @patch.object(rpc, \u0027get_client\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_46ce30b5","line":29,"in_reply_to":"3acd31a7_b84c1c43","updated":"2015-05-04 14:25:45.000000000","message":"That may not be correct.  This test should be testing the 1.0 API - when the API is bumped up, this file should continue to test the 1.0 API to ensure backwards compatibility.","commit_id":"b0e65e9ada9472b1fa20827f403e33c5bc1bcbc3"},{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"238f02cab37fb5ebf06147253a73e15aafdda2f5","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        self._verify_cast(\u0027delete_cluster\u0027, cluster_id\u003d\u0027some-cluster-id\u0027)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    @patch.object(agent_models, \u0027AgentHeartBeat\u0027)"},{"line_number":85,"context_line":"    def test__delete_heartbeat(self, mock_agent_heart_beat):"},{"line_number":86,"context_line":"        self.api._delete_heartbeat(\u0027some-cluster-id\u0027)"},{"line_number":87,"context_line":"        mock_agent_heart_beat.return_value.delete.assert_called()"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_51772c3a","line":85,"updated":"2015-05-01 22:03:39.000000000","message":"Just a question - why is it test__delete_object instead of test_delete_object?","commit_id":"b0e65e9ada9472b1fa20827f403e33c5bc1bcbc3"},{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"238f02cab37fb5ebf06147253a73e15aafdda2f5","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        self.api._delete_heartbeat(\u0027some-cluster-id\u0027)"},{"line_number":94,"context_line":"        mock_agent_heart_beat.return_value.delete.assert_not_called()"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def test__transform_obj(self):"},{"line_number":97,"context_line":"        flavor \u003d Mock()"},{"line_number":98,"context_line":"        self.assertRaisesRegexp(ValueError,"},{"line_number":99,"context_line":"                                (\u0027Could not transform %s\u0027 % flavor),"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_7178e82b","line":96,"updated":"2015-05-01 22:03:39.000000000","message":"Just a question - shouldnt it be test_transform_obj instead of test__transform_obj?","commit_id":"b0e65e9ada9472b1fa20827f403e33c5bc1bcbc3"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"46b4837190456543c9ffd7222c69708e90eb5d77","unresolved":false,"context_lines":[{"line_number":28,"context_line":"RPC_API_VERSION \u003d \u00271.0\u0027"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class ApiTest(TestCase):"},{"line_number":32,"context_line":"    @patch.object(rpc, \u0027get_client\u0027)"},{"line_number":33,"context_line":"    def setUp(self, *args):"},{"line_number":34,"context_line":"        super(ApiTest, self).setUp()"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aca2d91_af419b0d","line":31,"updated":"2015-05-06 23:50:13.000000000","message":"This will need update to \u0027trove_testtools.TestCase\u0027.","commit_id":"bd82960664f4eedd2de8a3c945652f77762a1edc"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"aa31fb430629c35299ba8aa1481811ce98476c91","unresolved":false,"context_lines":[{"line_number":28,"context_line":"RPC_API_VERSION \u003d \u00271.0\u0027"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class ApiTest(TestCase):"},{"line_number":32,"context_line":"    @patch.object(rpc, \u0027get_client\u0027)"},{"line_number":33,"context_line":"    def setUp(self, *args):"},{"line_number":34,"context_line":"        super(ApiTest, self).setUp()"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aca2d91_28a1fc94","line":31,"in_reply_to":"1aca2d91_af419b0d","updated":"2015-05-07 07:05:41.000000000","message":"As is visible in test code, there are no leaked mocks and I have made consistent use of patch.object for mocking.\n\nSo there should not be need of using trove_testtools.TestCase","commit_id":"bd82960664f4eedd2de8a3c945652f77762a1edc"}],"trove/tests/unittests/taskmanager/test_manager.py":[{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"238f02cab37fb5ebf06147253a73e15aafdda2f5","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        try:"},{"line_number":67,"context_line":"            self.manager.detach_replica(self.context, \u0027some-instance-id\u0027)"},{"line_number":68,"context_line":"        except Exception:"},{"line_number":69,"context_line":"            self.fail(\"detach_replica raised unexpected exception.\")"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def test_promote_to_replica_source(self, *args):"},{"line_number":72,"context_line":"        mock_old_master \u003d Mock()"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_d53e81d9","line":69,"updated":"2015-05-01 22:03:39.000000000","message":"What exactly are we trying to test in the above testcase? I must admit I am not a big fan of using try-except statements in test cases. Doesnt it make sense to use assertRaises or assertRaisesRegExp to test for specific errors.","commit_id":"b0e65e9ada9472b1fa20827f403e33c5bc1bcbc3"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"08f5bec71c38e34b0b3370ca06ee9dd35b3a6472","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        try:"},{"line_number":67,"context_line":"            self.manager.detach_replica(self.context, \u0027some-instance-id\u0027)"},{"line_number":68,"context_line":"        except Exception:"},{"line_number":69,"context_line":"            self.fail(\"detach_replica raised unexpected exception.\")"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def test_promote_to_replica_source(self, *args):"},{"line_number":72,"context_line":"        mock_old_master \u003d Mock()"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_4cf771f5","line":69,"in_reply_to":"3acd31a7_6627ec64","updated":"2015-05-04 15:14:31.000000000","message":"The tests with the method call, are covering the code through mocked procedure calls to check the code flow, and it would fail in case it gets something erroneous.","commit_id":"b0e65e9ada9472b1fa20827f403e33c5bc1bcbc3"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"0e7d84f5e39daaaa1b5f8991c7f9f2c392eea485","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        try:"},{"line_number":67,"context_line":"            self.manager.detach_replica(self.context, \u0027some-instance-id\u0027)"},{"line_number":68,"context_line":"        except Exception:"},{"line_number":69,"context_line":"            self.fail(\"detach_replica raised unexpected exception.\")"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def test_promote_to_replica_source(self, *args):"},{"line_number":72,"context_line":"        mock_old_master \u003d Mock()"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_6627ec64","line":69,"in_reply_to":"3acd31a7_d53e81d9","updated":"2015-05-04 14:25:45.000000000","message":"Agreed, this is a pointless test - it doesn\u0027t actually test anything.  Also, unexpected exceptions should pass through to the test class - if you have a specific reason for catching the exception, you should add a comment.","commit_id":"b0e65e9ada9472b1fa20827f403e33c5bc1bcbc3"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"3ad26111a29276dd6dd0c0a5130c5861f29be5db","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    def test_promote_to_replica_source(self, *args):"},{"line_number":72,"context_line":"        mock_old_master \u003d Mock()"},{"line_number":73,"context_line":"        mock_slave1 \u003d Mock()"},{"line_number":74,"context_line":"        type(mock_slave1).id \u003d \u0027some-instance-id\u0027"},{"line_number":75,"context_line":"        mock_slave2 \u003d Mock()"},{"line_number":76,"context_line":"        type(mock_slave2).id \u003d \u0027inst1\u0027"},{"line_number":77,"context_line":"        type(mock_old_master).slaves \u003d [mock_slave1, mock_slave2]"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_4e778d3a","line":74,"updated":"2015-05-01 16:16:51.000000000","message":"This is very likely wrong. You are setting mock (instance) variables, but these really are properties (see \u0027models.SimpleInstance\u0027). It may work because the code happens to access them as variables (but if it called them instead [should invoke a getter] the test would fail saying that the string is not callable).\nYou should configure the mock object with properties - see \u0027PropertyMock\u0027 in \u0027https://docs.python.org/3/library/unittest.mock.html\u0027.","commit_id":"b0e65e9ada9472b1fa20827f403e33c5bc1bcbc3"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"3ad26111a29276dd6dd0c0a5130c5861f29be5db","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                self.manager.promote_to_replica_source(self.context,"},{"line_number":84,"context_line":"                                                       \u0027some-instance-id\u0027)"},{"line_number":85,"context_line":"        except Exception:"},{"line_number":86,"context_line":"            self.fail(\"promote_to_replica_source raised unexpected exception.\")"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    @patch.object(Manager, \u0027_most_current_replica\u0027)"},{"line_number":89,"context_line":"    def test_eject_replica_source(self, *args):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_ae9ce15d","line":86,"updated":"2015-05-01 16:16:51.000000000","message":"Also, won\u0027t this obfuscate the causing exception - the user should probably be informed about what caused the failure?","commit_id":"b0e65e9ada9472b1fa20827f403e33c5bc1bcbc3"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"0e7d84f5e39daaaa1b5f8991c7f9f2c392eea485","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                                           mock_slave2]):"},{"line_number":100,"context_line":"                self.manager.eject_replica_source(self.context,"},{"line_number":101,"context_line":"                                                  \u0027some-instance-id\u0027)"},{"line_number":102,"context_line":"        except Exception:"},{"line_number":103,"context_line":"            self.fail(\"eject_replica_source raised unexpected exception.\")"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    @patch.object(Manager, \u0027_set_task_status\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_66b5acec","line":102,"updated":"2015-05-04 14:25:45.000000000","message":"Unnecessary exception discard, here, too.","commit_id":"b0e65e9ada9472b1fa20827f403e33c5bc1bcbc3"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"0e7d84f5e39daaaa1b5f8991c7f9f2c392eea485","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        with patch.object(models.BuiltInstanceTasks, \u0027load\u0027,"},{"line_number":152,"context_line":"                          side_effect\u003d[mock_slave1, mock_old_master,"},{"line_number":153,"context_line":"                                       mock_slave2]):"},{"line_number":154,"context_line":"            self.assertRaisesRegexp(RuntimeError, \u0027Error\u0027,"},{"line_number":155,"context_line":"                                    self.manager.promote_to_replica_source,"},{"line_number":156,"context_line":"                                    self.context, \u0027some-instance-id\u0027)"},{"line_number":157,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_0679582f","line":154,"updated":"2015-05-04 14:25:45.000000000","message":"You couldn\u0027t check for more than just \"Error\"?  If that\u0027s all there is in the exception, the exception needs to be fixed.","commit_id":"b0e65e9ada9472b1fa20827f403e33c5bc1bcbc3"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"08f5bec71c38e34b0b3370ca06ee9dd35b3a6472","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        with patch.object(models.BuiltInstanceTasks, \u0027load\u0027,"},{"line_number":152,"context_line":"                          side_effect\u003d[mock_slave1, mock_old_master,"},{"line_number":153,"context_line":"                                       mock_slave2]):"},{"line_number":154,"context_line":"            self.assertRaisesRegexp(RuntimeError, \u0027Error\u0027,"},{"line_number":155,"context_line":"                                    self.manager.promote_to_replica_source,"},{"line_number":156,"context_line":"                                    self.context, \u0027some-instance-id\u0027)"},{"line_number":157,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_8c3b499c","line":154,"in_reply_to":"3acd31a7_0679582f","updated":"2015-05-04 15:14:31.000000000","message":"\"Error\" is not from code, code re-raises the exception after setting up the task_status, so this message \"Error\" has been setup here in test.","commit_id":"b0e65e9ada9472b1fa20827f403e33c5bc1bcbc3"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"0e7d84f5e39daaaa1b5f8991c7f9f2c392eea485","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        mock_most_current_replica.return_value \u003d mock_slave1"},{"line_number":188,"context_line":"        with patch.object(models.BuiltInstanceTasks, \u0027load\u0027,"},{"line_number":189,"context_line":"                          side_effect\u003d[mock_master, mock_slave1, mock_slave2]):"},{"line_number":190,"context_line":"            self.assertRaisesRegexp(RuntimeError, \u0027Error\u0027,"},{"line_number":191,"context_line":"                                    self.manager.eject_replica_source,"},{"line_number":192,"context_line":"                                    self.context, \u0027some-instance-id\u0027)"},{"line_number":193,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_a6906444","line":190,"updated":"2015-05-04 14:25:45.000000000","message":"Again, more than \"Error\"","commit_id":"b0e65e9ada9472b1fa20827f403e33c5bc1bcbc3"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"0e7d84f5e39daaaa1b5f8991c7f9f2c392eea485","unresolved":false,"context_lines":[{"line_number":200,"context_line":"                                         \u0027mysql-server\u0027, 2, \u0027temp-backup-id\u0027,"},{"line_number":201,"context_line":"                                         None, \u0027some_password\u0027, None, Mock(),"},{"line_number":202,"context_line":"                                         \u0027some-master-id\u0027, None)"},{"line_number":203,"context_line":"        except Exception:"},{"line_number":204,"context_line":"            self.fail(\"_create_replication_slave raised unexpected exception.\")"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    @patch.object(models.FreshInstanceTasks, \u0027load\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_8693284f","line":203,"updated":"2015-05-04 14:25:45.000000000","message":"Unnecessary exception discard","commit_id":"b0e65e9ada9472b1fa20827f403e33c5bc1bcbc3"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"0e7d84f5e39daaaa1b5f8991c7f9f2c392eea485","unresolved":false,"context_lines":[{"line_number":207,"context_line":"    @patch.object(Backup, \u0027delete\u0027)"},{"line_number":208,"context_line":"    def test_exception__create_replication_slave(self, mock_delete, mock_load):"},{"line_number":209,"context_line":"        mock_load.return_value.create_instance \u003d Mock(side_effect\u003dTroveError)"},{"line_number":210,"context_line":"        self.assertRaises(TroveError, self.manager.create_instance,"},{"line_number":211,"context_line":"                          self.context, [\u0027id1\u0027, \u0027id2\u0027], Mock(), Mock(),"},{"line_number":212,"context_line":"                          Mock(), None, None, \u0027mysql\u0027, \u0027mysql-server\u0027, 2,"},{"line_number":213,"context_line":"                          \u0027temp-backup-id\u0027, None, \u0027some_password\u0027, None,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_26a574a1","line":210,"updated":"2015-05-04 14:25:45.000000000","message":"Should be assertRaisesRegexp","commit_id":"b0e65e9ada9472b1fa20827f403e33c5bc1bcbc3"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"08f5bec71c38e34b0b3370ca06ee9dd35b3a6472","unresolved":false,"context_lines":[{"line_number":207,"context_line":"    @patch.object(Backup, \u0027delete\u0027)"},{"line_number":208,"context_line":"    def test_exception__create_replication_slave(self, mock_delete, mock_load):"},{"line_number":209,"context_line":"        mock_load.return_value.create_instance \u003d Mock(side_effect\u003dTroveError)"},{"line_number":210,"context_line":"        self.assertRaises(TroveError, self.manager.create_instance,"},{"line_number":211,"context_line":"                          self.context, [\u0027id1\u0027, \u0027id2\u0027], Mock(), Mock(),"},{"line_number":212,"context_line":"                          Mock(), None, None, \u0027mysql\u0027, \u0027mysql-server\u0027, 2,"},{"line_number":213,"context_line":"                          \u0027temp-backup-id\u0027, None, \u0027some_password\u0027, None,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_ac2de547","line":210,"in_reply_to":"3acd31a7_26a574a1","updated":"2015-05-04 15:14:31.000000000","message":"Same effect, _create_replication_slave just re-raises the exception after logging the exception, so if you see the exception message would only come from mocked side_effect.","commit_id":"b0e65e9ada9472b1fa20827f403e33c5bc1bcbc3"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"0e7d84f5e39daaaa1b5f8991c7f9f2c392eea485","unresolved":false,"context_lines":[{"line_number":228,"context_line":"                                         \u0027mysql-server\u0027, 2, \u0027temp-backup-id\u0027,"},{"line_number":229,"context_line":"                                         None, \u0027some_password\u0027, None, Mock(),"},{"line_number":230,"context_line":"                                         None, None)"},{"line_number":231,"context_line":"        except Exception:"},{"line_number":232,"context_line":"            self.fail(\"create_instance raised unexpected exception.\")"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    @patch.object(models, \u0027load_cluster_tasks\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_a6b744d7","line":231,"updated":"2015-05-04 14:25:45.000000000","message":"Unnecessary exception discard","commit_id":"b0e65e9ada9472b1fa20827f403e33c5bc1bcbc3"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"08f5bec71c38e34b0b3370ca06ee9dd35b3a6472","unresolved":false,"context_lines":[{"line_number":228,"context_line":"                                         \u0027mysql-server\u0027, 2, \u0027temp-backup-id\u0027,"},{"line_number":229,"context_line":"                                         None, \u0027some_password\u0027, None, Mock(),"},{"line_number":230,"context_line":"                                         None, None)"},{"line_number":231,"context_line":"        except Exception:"},{"line_number":232,"context_line":"            self.fail(\"create_instance raised unexpected exception.\")"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    @patch.object(models, \u0027load_cluster_tasks\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_acbba5e4","line":231,"in_reply_to":"3acd31a7_a6b744d7","updated":"2015-05-04 15:14:31.000000000","message":"These tests are testing the mocked procedures and covering the code, the test would only fail in case of abrupt events, in general it should not fail, however the benefit of test is to increase the code-coverage.","commit_id":"b0e65e9ada9472b1fa20827f403e33c5bc1bcbc3"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"0e7d84f5e39daaaa1b5f8991c7f9f2c392eea485","unresolved":false,"context_lines":[{"line_number":235,"context_line":"    def test_create_cluster(self, *args):"},{"line_number":236,"context_line":"        try:"},{"line_number":237,"context_line":"            self.manager.create_cluster(self.context, \u0027some-cluster-id\u0027)"},{"line_number":238,"context_line":"        except Exception:"},{"line_number":239,"context_line":"            self.fail(\"create_cluster raised unexpected exception.\")"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    @patch.object(models, \u0027load_cluster_tasks\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_66b12ce1","line":238,"updated":"2015-05-04 14:25:45.000000000","message":"Unnecessary exception discard","commit_id":"b0e65e9ada9472b1fa20827f403e33c5bc1bcbc3"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"0e7d84f5e39daaaa1b5f8991c7f9f2c392eea485","unresolved":false,"context_lines":[{"line_number":242,"context_line":"    def test_delete_cluster(self, *args):"},{"line_number":243,"context_line":"        try:"},{"line_number":244,"context_line":"            self.manager.delete_cluster(self.context, \u0027some-cluster-id\u0027)"},{"line_number":245,"context_line":"        except Exception:"},{"line_number":246,"context_line":"            self.fail(\"delete_cluster raised unexpected exception.\")"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_06c71846","line":245,"updated":"2015-05-04 14:25:45.000000000","message":"Unnecessary exception discard","commit_id":"b0e65e9ada9472b1fa20827f403e33c5bc1bcbc3"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"0e7d84f5e39daaaa1b5f8991c7f9f2c392eea485","unresolved":false,"context_lines":[{"line_number":250,"context_line":"    def test_app_factory(self):"},{"line_number":251,"context_line":"        try:"},{"line_number":252,"context_line":"            service.app_factory(Mock())"},{"line_number":253,"context_line":"        except Exception:"},{"line_number":254,"context_line":"            self.fail(\"app_factory raised unexpected exception.\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_e6c53c3c","line":253,"updated":"2015-05-04 14:25:45.000000000","message":"Unnecessary exception discard","commit_id":"b0e65e9ada9472b1fa20827f403e33c5bc1bcbc3"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"46b4837190456543c9ffd7222c69708e90eb5d77","unresolved":false,"context_lines":[{"line_number":258,"context_line":"                                                     \u0027some-cluster-id\u0027)"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"class TestTaskManagerService(TestCase):"},{"line_number":262,"context_line":"    def test_app_factory(self):"},{"line_number":263,"context_line":"        test_service \u003d service.app_factory(Mock())"},{"line_number":264,"context_line":"        self.assertIsInstance(test_service, service.TaskService)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aca2d91_4f49e730","line":261,"updated":"2015-05-06 23:50:13.000000000","message":"This will need update to \u0027trove_testtools.TestCase\u0027.","commit_id":"bd82960664f4eedd2de8a3c945652f77762a1edc"},{"author":{"_account_id":7806,"name":"Sushil Kumar","email":"skm.net@gmail.com","username":"sushilkm"},"change_message_id":"aa31fb430629c35299ba8aa1481811ce98476c91","unresolved":false,"context_lines":[{"line_number":258,"context_line":"                                                     \u0027some-cluster-id\u0027)"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"class TestTaskManagerService(TestCase):"},{"line_number":262,"context_line":"    def test_app_factory(self):"},{"line_number":263,"context_line":"        test_service \u003d service.app_factory(Mock())"},{"line_number":264,"context_line":"        self.assertIsInstance(test_service, service.TaskService)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aca2d91_68b5b4cb","line":261,"in_reply_to":"1aca2d91_4f49e730","updated":"2015-05-07 07:05:41.000000000","message":"As is visible in test code, there are no leaked mocks and I have made consistent use of patch.object for mocking.\n\nSo there should not be need of using trove_testtools.TestCase","commit_id":"bd82960664f4eedd2de8a3c945652f77762a1edc"}],"trove/tests/unittests/taskmanager/test_models.py":[{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"de1d35721027f212faa474112c9b148b44b11e1d","unresolved":false,"context_lines":[{"line_number":377,"context_line":""},{"line_number":378,"context_line":"    @patch.object(BaseInstance, \u0027update_db\u0027)"},{"line_number":379,"context_line":"    @patch.object(backup_models.Backup, \u0027get_by_id\u0027)"},{"line_number":380,"context_line":"    @patch.object(taskmanager_models.FreshInstanceTasks, \u0027report_root_enabled\u0027)"},{"line_number":381,"context_line":"    @patch.object(taskmanager_models.FreshInstanceTasks, \u0027_get_injected_files\u0027)"},{"line_number":382,"context_line":"    @patch.object(taskmanager_models.FreshInstanceTasks, \u0027_create_secgroup\u0027)"},{"line_number":383,"context_line":"    @patch.object(taskmanager_models.FreshInstanceTasks, \u0027_build_volume_info\u0027)"},{"line_number":384,"context_line":"    @patch.object(taskmanager_models.FreshInstanceTasks, \u0027_create_server\u0027)"},{"line_number":385,"context_line":"    @patch.object(taskmanager_models.FreshInstanceTasks, \u0027_guest_prepare\u0027)"},{"line_number":386,"context_line":"    @patch.object(template, \u0027SingleInstanceConfigTemplate\u0027)"},{"line_number":387,"context_line":"    @patch.object(template, \u0027OverrideConfigTemplate\u0027)"},{"line_number":388,"context_line":"    @patch.object(taskmanager_models.FreshInstanceTasks, \u0027_create_dns_entry\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a0c5dc1_c3859707","line":385,"range":{"start_line":380,"start_character":0,"end_line":385,"end_character":74},"updated":"2015-05-13 20:20:09.000000000","message":"These would have been a prime candidate for @patch.multiple","commit_id":"5567d117c09633c93d20e64224329e9326370726"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"de1d35721027f212faa474112c9b148b44b11e1d","unresolved":false,"context_lines":[{"line_number":397,"context_line":"            2, Mock(), None, \u0027root_password\u0027, None, Mock(), None)"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"    @patch.object(BaseInstance, \u0027update_db\u0027)"},{"line_number":400,"context_line":"    @patch.object(taskmanager_models.FreshInstanceTasks, \u0027_create_dns_entry\u0027)"},{"line_number":401,"context_line":"    @patch.object(taskmanager_models.FreshInstanceTasks, \u0027_get_injected_files\u0027)"},{"line_number":402,"context_line":"    @patch.object(taskmanager_models.FreshInstanceTasks, \u0027_create_server\u0027)"},{"line_number":403,"context_line":"    @patch.object(taskmanager_models.FreshInstanceTasks, \u0027_create_secgroup\u0027)"},{"line_number":404,"context_line":"    @patch.object(taskmanager_models.FreshInstanceTasks, \u0027_build_volume_info\u0027)"},{"line_number":405,"context_line":"    @patch.object(taskmanager_models.FreshInstanceTasks, \u0027_guest_prepare\u0027)"},{"line_number":406,"context_line":"    @patch.object(template, \u0027SingleInstanceConfigTemplate\u0027)"},{"line_number":407,"context_line":"    @patch.object(template, \u0027OverrideConfigTemplate\u0027)"},{"line_number":408,"context_line":"    def test_create_instance(self,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a0c5dc1_038ccf33","line":405,"range":{"start_line":400,"start_character":0,"end_line":405,"end_character":74},"updated":"2015-05-13 20:20:09.000000000","message":"ditto","commit_id":"5567d117c09633c93d20e64224329e9326370726"}]}
