)]}'
{"senlin/tests/tempest/api/clusters/test_cluster_show_negative.py":[{"author":{"_account_id":8246,"name":"Qiming Teng","email":"tengqm@outlook.com","username":"tengqm"},"change_message_id":"59af41d65fead7d825f2287a91844186ae53e869","unresolved":false,"context_lines":[{"line_number":28,"context_line":"                          \u0027clusters\u0027, \u0027bbc593ff-8556-416e-83c3-384e5c14d363\u0027)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class TestClusterShowNegativeBadRequest(base.BaseSenlinTest):"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def setUp(self):"},{"line_number":34,"context_line":"        super(TestClusterShowNegativeBadRequest, self).setUp()"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_adf9e04f","line":31,"range":{"start_line":31,"start_character":29,"end_line":31,"end_character":39},"updated":"2016-06-06 07:04:39.000000000","message":"Change this to \u0027NotUnique\u0027 or \u0027MultiChoice\u0027?\n\n\u0027BadRequest\u0027 sounds too generic.","commit_id":"4dc64db26a49cccdacad0a1cb58a5c46c81c9c74"},{"author":{"_account_id":8246,"name":"Qiming Teng","email":"tengqm@outlook.com","username":"tengqm"},"change_message_id":"2f26fcfbe1fd4f40bef552ed61fad47b0f2bf6ed","unresolved":false,"context_lines":[{"line_number":28,"context_line":"                          \u0027clusters\u0027, \u0027bbc593ff-8556-416e-83c3-384e5c14d363\u0027)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class TestClusterShowNegativeBadRequest(base.BaseSenlinTest):"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def setUp(self):"},{"line_number":34,"context_line":"        super(TestClusterShowNegativeBadRequest, self).setUp()"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_d213285b","line":31,"range":{"start_line":31,"start_character":29,"end_line":31,"end_character":39},"in_reply_to":"7aa08908_08d0e252","updated":"2016-06-06 07:42:25.000000000","message":"okay, renaming function makes more sense.","commit_id":"4dc64db26a49cccdacad0a1cb58a5c46c81c9c74"},{"author":{"_account_id":11034,"name":"Yanyan Hu","email":"huyanyan84@gmail.com","username":"yanyanhu"},"change_message_id":"15c8f634df1eec019547f85bc7e15d388259c509","unresolved":false,"context_lines":[{"line_number":28,"context_line":"                          \u0027clusters\u0027, \u0027bbc593ff-8556-416e-83c3-384e5c14d363\u0027)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class TestClusterShowNegativeBadRequest(base.BaseSenlinTest):"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def setUp(self):"},{"line_number":34,"context_line":"        super(TestClusterShowNegativeBadRequest, self).setUp()"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_08d0e252","line":31,"range":{"start_line":31,"start_character":29,"end_line":31,"end_character":39},"in_reply_to":"7aa08908_adf9e04f","updated":"2016-06-06 07:25:09.000000000","message":"Yes, multichoice is more specific. I just tried to define all badrequest cases into the same class(although for cluster show interface, multiple choice case is the only one). \n\nSo how about defining the function name(line46) to test_cluster_show_multiple_choice, so we can tell this test function is for multiple_choice error which is one of the case that will cause HTTP BadRequest exception? \n\nThen the naming rule will be like this: cluster_show_negative(test module name) -\u003e ClusterShowNegativeBadRequest(test class name, there could be other classes for other HTTP exceptions, e.g. NotFound) -\u003e test_cluster_show_multiple_choice(test func name, based on exact reason for error).","commit_id":"4dc64db26a49cccdacad0a1cb58a5c46c81c9c74"},{"author":{"_account_id":8246,"name":"Qiming Teng","email":"tengqm@outlook.com","username":"tengqm"},"change_message_id":"511a8bb27b4a09c84362cedfb3ebf63434c40775","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        super(TestClusterShowNegativeBadRequest, self).setUp()"},{"line_number":35,"context_line":"        profile_id \u003d utils.create_a_profile(self)"},{"line_number":36,"context_line":"        self.addCleanup(utils.delete_a_profile, self, profile_id)"},{"line_number":37,"context_line":"        self.cluster_id1 \u003d utils.create_a_cluster(self, profile_id,"},{"line_number":38,"context_line":"                                                  name\u003d\u0027c-01\u0027)"},{"line_number":39,"context_line":"        self.cluster_id2 \u003d utils.create_a_cluster(self, profile_id,"},{"line_number":40,"context_line":"                                                  name\u003d\u0027c-01\u0027)"},{"line_number":41,"context_line":"        self.addCleanup(utils.delete_a_cluster, self, self.cluster_id1)"},{"line_number":42,"context_line":"        self.addCleanup(utils.delete_a_cluster, self, self.cluster_id2)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    @test.attr(type\u003d[\u0027negative\u0027])"},{"line_number":45,"context_line":"    @decorators.idempotent_id(\u00273365dca5-8895-4dc3-befe-fd15b17c824c\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aa08908_b5a00692","line":42,"range":{"start_line":37,"start_character":0,"end_line":42,"end_character":71},"updated":"2016-06-06 08:17:10.000000000","message":"Not sure if there will be other cases which will return 400. However, if there are such cases, the creation of two clusters here is not a clean setup for all BadRequest cases. These are only required for the multiple-choices test case. One option is to keep this code as is, and refactor it in future so that the additional cluster creation is moved to \u0027test_cluster_show_multiple_choices\u0027 method. That is not optimal however. We are polluting the test case. Another option is to rename the class and make it dedicated to testing multiple choices.\n\nAnyway, the code is fine. Just some additional thoughts.","commit_id":"1353593729e75c2eaa6fb21d3bd9ba8117d97053"},{"author":{"_account_id":11034,"name":"Yanyan Hu","email":"huyanyan84@gmail.com","username":"yanyanhu"},"change_message_id":"84771c68a85a5f531423418962db578aa865d9bb","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        super(TestClusterShowNegativeBadRequest, self).setUp()"},{"line_number":35,"context_line":"        profile_id \u003d utils.create_a_profile(self)"},{"line_number":36,"context_line":"        self.addCleanup(utils.delete_a_profile, self, profile_id)"},{"line_number":37,"context_line":"        self.cluster_id1 \u003d utils.create_a_cluster(self, profile_id,"},{"line_number":38,"context_line":"                                                  name\u003d\u0027c-01\u0027)"},{"line_number":39,"context_line":"        self.cluster_id2 \u003d utils.create_a_cluster(self, profile_id,"},{"line_number":40,"context_line":"                                                  name\u003d\u0027c-01\u0027)"},{"line_number":41,"context_line":"        self.addCleanup(utils.delete_a_cluster, self, self.cluster_id1)"},{"line_number":42,"context_line":"        self.addCleanup(utils.delete_a_cluster, self, self.cluster_id2)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    @test.attr(type\u003d[\u0027negative\u0027])"},{"line_number":45,"context_line":"    @decorators.idempotent_id(\u00273365dca5-8895-4dc3-befe-fd15b17c824c\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aa08908_f5f9ee4e","line":42,"range":{"start_line":37,"start_character":0,"end_line":42,"end_character":71},"in_reply_to":"7aa08908_b5a00692","updated":"2016-06-06 08:24:07.000000000","message":"Yes, that is important for minimize the test overhead. Will think more about it to see whether we can further refactor existing tests to make them more dedicated.","commit_id":"1353593729e75c2eaa6fb21d3bd9ba8117d97053"}]}
