)]}'
{"senlin/tests/tempest/api/clusters/test_cluster_update_negative.py":[{"author":{"_account_id":8246,"name":"Qiming Teng","email":"tengqm@outlook.com","username":"tengqm"},"change_message_id":"695a87e9b95434929544a912a17ef1952ac36436","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class TestClusterUpdateNegativeBadRequest(base.BaseSenlinTest):"},{"line_number":35,"context_line":"    def setUp(self):"},{"line_number":36,"context_line":"        super(TestClusterUpdateNegativeBadRequest, self).setUp()"},{"line_number":37,"context_line":"        # Create a profile"},{"line_number":38,"context_line":"        profile_id \u003d utils.create_a_profile(self)"},{"line_number":39,"context_line":"        self.addCleanup(utils.delete_a_profile, self, profile_id)"},{"line_number":40,"context_line":"        self.profile_id \u003d profile_id"},{"line_number":41,"context_line":"        # Create a cluster"},{"line_number":42,"context_line":"        self.cluster_id \u003d utils.create_a_cluster(self, profile_id)"},{"line_number":43,"context_line":"        self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)"},{"line_number":44,"context_line":"        # Create a new profile of different type"},{"line_number":45,"context_line":"        self.new_profile_id1 \u003d utils.create_a_profile("},{"line_number":46,"context_line":"            self, spec\u003dconstants.spec_heat_stack)"},{"line_number":47,"context_line":"        self.addCleanup(utils.delete_a_profile, self, self.new_profile_id1)"},{"line_number":48,"context_line":"        # Create two new profiles of the same type with the same name"},{"line_number":49,"context_line":"        new_spec \u003d copy.deepcopy(constants.spec_nova_server)"},{"line_number":50,"context_line":"        new_spec[\u0027properties\u0027][\u0027flavor\u0027] \u003d \u0027new_flavor\u0027"},{"line_number":51,"context_line":"        new_profile_id2 \u003d utils.create_a_profile(self, new_spec, name\u003d\u0027p-nova\u0027)"},{"line_number":52,"context_line":"        new_profile_id3 \u003d utils.create_a_profile(self, new_spec, name\u003d\u0027p-nova\u0027)"},{"line_number":53,"context_line":"        self.addCleanup(utils.delete_a_profile, self, new_profile_id2)"},{"line_number":54,"context_line":"        self.addCleanup(utils.delete_a_profile, self, new_profile_id3)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    @test.attr(type\u003d[\u0027negative\u0027])"},{"line_number":57,"context_line":"    @decorators.idempotent_id(\u0027fb68921d-1fe8-4c14-be9a-51fa43d4f705\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aa08908_95122a61","line":54,"range":{"start_line":36,"start_character":0,"end_line":54,"end_character":70},"updated":"2016-06-06 08:28:18.000000000","message":"all these code will be executed for all the test cases in the class. really need some optimization here. One possible way is to split it into individual classes each of which has its own setUp dedicated for the corresponding test case.","commit_id":"01940af8a3f72589c8320e1d351871890cbaeb05"},{"author":{"_account_id":11034,"name":"Yanyan Hu","email":"huyanyan84@gmail.com","username":"yanyanhu"},"change_message_id":"57604de46566f98b3d15c0937c6c03220c616e40","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class TestClusterUpdateNegativeBadRequest(base.BaseSenlinTest):"},{"line_number":35,"context_line":"    def setUp(self):"},{"line_number":36,"context_line":"        super(TestClusterUpdateNegativeBadRequest, self).setUp()"},{"line_number":37,"context_line":"        # Create a profile"},{"line_number":38,"context_line":"        profile_id \u003d utils.create_a_profile(self)"},{"line_number":39,"context_line":"        self.addCleanup(utils.delete_a_profile, self, profile_id)"},{"line_number":40,"context_line":"        self.profile_id \u003d profile_id"},{"line_number":41,"context_line":"        # Create a cluster"},{"line_number":42,"context_line":"        self.cluster_id \u003d utils.create_a_cluster(self, profile_id)"},{"line_number":43,"context_line":"        self.addCleanup(utils.delete_a_cluster, self, self.cluster_id)"},{"line_number":44,"context_line":"        # Create a new profile of different type"},{"line_number":45,"context_line":"        self.new_profile_id1 \u003d utils.create_a_profile("},{"line_number":46,"context_line":"            self, spec\u003dconstants.spec_heat_stack)"},{"line_number":47,"context_line":"        self.addCleanup(utils.delete_a_profile, self, self.new_profile_id1)"},{"line_number":48,"context_line":"        # Create two new profiles of the same type with the same name"},{"line_number":49,"context_line":"        new_spec \u003d copy.deepcopy(constants.spec_nova_server)"},{"line_number":50,"context_line":"        new_spec[\u0027properties\u0027][\u0027flavor\u0027] \u003d \u0027new_flavor\u0027"},{"line_number":51,"context_line":"        new_profile_id2 \u003d utils.create_a_profile(self, new_spec, name\u003d\u0027p-nova\u0027)"},{"line_number":52,"context_line":"        new_profile_id3 \u003d utils.create_a_profile(self, new_spec, name\u003d\u0027p-nova\u0027)"},{"line_number":53,"context_line":"        self.addCleanup(utils.delete_a_profile, self, new_profile_id2)"},{"line_number":54,"context_line":"        self.addCleanup(utils.delete_a_profile, self, new_profile_id3)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    @test.attr(type\u003d[\u0027negative\u0027])"},{"line_number":57,"context_line":"    @decorators.idempotent_id(\u0027fb68921d-1fe8-4c14-be9a-51fa43d4f705\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aa08908_18e83110","line":54,"range":{"start_line":36,"start_character":0,"end_line":54,"end_character":70},"in_reply_to":"7aa08908_95122a61","updated":"2016-06-06 08:32:43.000000000","message":"Agree. Will make a further splitting to make each case more specific.","commit_id":"01940af8a3f72589c8320e1d351871890cbaeb05"},{"author":{"_account_id":8246,"name":"Qiming Teng","email":"tengqm@outlook.com","username":"tengqm"},"change_message_id":"695a87e9b95434929544a912a17ef1952ac36436","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        self.addCleanup(utils.delete_a_profile, self, new_profile_id2)"},{"line_number":54,"context_line":"        self.addCleanup(utils.delete_a_profile, self, new_profile_id3)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    @test.attr(type\u003d[\u0027negative\u0027])"},{"line_number":57,"context_line":"    @decorators.idempotent_id(\u0027fb68921d-1fe8-4c14-be9a-51fa43d4f705\u0027)"},{"line_number":58,"context_line":"    def test_cluster_update_profile_not_found(self):"},{"line_number":59,"context_line":"        # Provided profile can not be found"},{"line_number":60,"context_line":"        params \u003d {"},{"line_number":61,"context_line":"            \u0027cluster\u0027: {"},{"line_number":62,"context_line":"                \u0027profile_id\u0027: \u0027fb68921d-1fe8-4c14-be9a-51fa43d4f705\u0027,"},{"line_number":63,"context_line":"            }"},{"line_number":64,"context_line":"        }"},{"line_number":65,"context_line":"        # Verify badrequest exception(400) is raised."},{"line_number":66,"context_line":"        self.assertRaises(exceptions.BadRequest,"},{"line_number":67,"context_line":"                          self.client.update_obj,"},{"line_number":68,"context_line":"                          \u0027clusters\u0027, self.cluster_id, params)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    @test.attr(type\u003d[\u0027negative\u0027])"},{"line_number":71,"context_line":"    @decorators.idempotent_id(\u00276a3eb86c-4b5c-4cfc-891c-7b0be17715f2\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aa08908_75405e57","line":68,"range":{"start_line":56,"start_character":0,"end_line":68,"end_character":62},"updated":"2016-06-06 08:28:18.000000000","message":"my feeling is that this method should be extracted into a separate class, just like what you do for cluster not found?","commit_id":"01940af8a3f72589c8320e1d351871890cbaeb05"},{"author":{"_account_id":11034,"name":"Yanyan Hu","email":"huyanyan84@gmail.com","username":"yanyanhu"},"change_message_id":"57604de46566f98b3d15c0937c6c03220c616e40","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        self.addCleanup(utils.delete_a_profile, self, new_profile_id2)"},{"line_number":54,"context_line":"        self.addCleanup(utils.delete_a_profile, self, new_profile_id3)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    @test.attr(type\u003d[\u0027negative\u0027])"},{"line_number":57,"context_line":"    @decorators.idempotent_id(\u0027fb68921d-1fe8-4c14-be9a-51fa43d4f705\u0027)"},{"line_number":58,"context_line":"    def test_cluster_update_profile_not_found(self):"},{"line_number":59,"context_line":"        # Provided profile can not be found"},{"line_number":60,"context_line":"        params \u003d {"},{"line_number":61,"context_line":"            \u0027cluster\u0027: {"},{"line_number":62,"context_line":"                \u0027profile_id\u0027: \u0027fb68921d-1fe8-4c14-be9a-51fa43d4f705\u0027,"},{"line_number":63,"context_line":"            }"},{"line_number":64,"context_line":"        }"},{"line_number":65,"context_line":"        # Verify badrequest exception(400) is raised."},{"line_number":66,"context_line":"        self.assertRaises(exceptions.BadRequest,"},{"line_number":67,"context_line":"                          self.client.update_obj,"},{"line_number":68,"context_line":"                          \u0027clusters\u0027, self.cluster_id, params)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    @test.attr(type\u003d[\u0027negative\u0027])"},{"line_number":71,"context_line":"    @decorators.idempotent_id(\u00276a3eb86c-4b5c-4cfc-891c-7b0be17715f2\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aa08908_585e39ea","line":68,"range":{"start_line":56,"start_character":0,"end_line":68,"end_character":62},"in_reply_to":"7aa08908_75405e57","updated":"2016-06-06 08:32:43.000000000","message":"Yes, will define multiple classes for different test cases if they have significantly different requirement of resource setup.","commit_id":"01940af8a3f72589c8320e1d351871890cbaeb05"}]}
