)]}'
{"monasca_tempest_tests/tests/api/test_alarms_state_history.py":[{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"c6b13d67d056ff66c58ca77587b9d594f14f0d1a","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        min_timestamp, max_timestamp \u003d self._min_max_timestamp_from_elements(elements)"},{"line_number":128,"context_line":"        start_time \u003d min_timestamp.replace(tzinfo\u003dNone).isoformat()"},{"line_number":129,"context_line":"        end_time \u003d max_timestamp.replace(tzinfo\u003dNone).isoformat()"},{"line_number":130,"context_line":"        query_params \u003d \u0027?start_time\u003d\u0027 + str(start_time) + \u0027\u0026end_time\u003d\u0027 + \\"},{"line_number":131,"context_line":"                      str(end_time)"},{"line_number":132,"context_line":"        resp2, response_body2 \u003d self.monasca_client.list_alarms_state_history("},{"line_number":133,"context_line":"            query_params)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_bac0bee1","line":130,"updated":"2015-11-13 20:07:19.000000000","message":"Should this test be using an end timestamp? I would expect a separate test for using both together since they are both optional.","commit_id":"976506eea90bbad75c8bd23b780b1f1c30fbaa96"},{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"c6b13d67d056ff66c58ca77587b9d594f14f0d1a","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        elements2 \u003d response_body2[\u0027elements\u0027]"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        #3. compare #1 and #2 ( #2 is two elements less than #1 )"},{"line_number":137,"context_line":"        self.assertEqual(len(elements) - 2, len(elements2))"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    @test.attr(type\u003d\"gate\")"},{"line_number":140,"context_line":"    def test_list_alarms_state_history_with_end_time(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_ba1c3e78","line":137,"updated":"2015-11-13 20:07:19.000000000","message":"I\u0027d prefer more descriptive variable names for the two sets of elements. Same in the test below","commit_id":"976506eea90bbad75c8bd23b780b1f1c30fbaa96"},{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"6680d75fd793fcd7269897c08ef83121321c10f0","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        if len(all_elements) \u003c 2:"},{"line_number":104,"context_line":"            error_msg \u003d \"Failed test_list_alarms_state_history_with_\" \\"},{"line_number":105,"context_line":"                        \"start_time: need 2 and more alarms state history \" \\"},{"line_number":106,"context_line":"                        \"to test.\""},{"line_number":107,"context_line":"            self.fail(error_msg)"},{"line_number":108,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ba8a016a_d6aee280","line":105,"updated":"2015-11-20 16:47:00.000000000","message":"I assume this is meant to be \"need 2 or more\" instead of \"need 2 and more\"?","commit_id":"08a30b6c93038b93a6820a934e12f679602b25c4"},{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"6680d75fd793fcd7269897c08ef83121321c10f0","unresolved":false,"context_lines":[{"line_number":115,"context_line":"            list_alarms_state_history(query_params)"},{"line_number":116,"context_line":"        selected_elements \u003d selected_response_body[\u0027elements\u0027]"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        # 3. compare #1 and #2"},{"line_number":119,"context_line":"        all_elements.remove(min_element)"},{"line_number":120,"context_line":"        all_without_min_timestamp_set \u003d\\"},{"line_number":121,"context_line":"            set([e[\u0027alarm_id\u0027] for e in all_elements])"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba8a016a_f18690da","line":118,"updated":"2015-11-20 16:47:00.000000000","message":"maybe this test could be reduced to one check by creating the list of expected elements and then checking equality with the list of received elements.","commit_id":"08a30b6c93038b93a6820a934e12f679602b25c4"},{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"6680d75fd793fcd7269897c08ef83121321c10f0","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        selected_set \u003d set([e[\u0027alarm_id\u0027] for e in selected_elements])"},{"line_number":157,"context_line":"        max_timestamp_set \u003d set([max_element[\u0027alarm_id\u0027]])"},{"line_number":158,"context_line":"        # elements except for max timestamp are subset of #2"},{"line_number":159,"context_line":"        self.assertTrue(all_without_max_timestamp_set.issubset(selected_set))"},{"line_number":160,"context_line":"        # element with max timestamp is not included in #2"},{"line_number":161,"context_line":"        self.assertTrue(max_timestamp_set,"},{"line_number":162,"context_line":"                        max_timestamp_set.difference(selected_set))"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba8a016a_d1aeec80","line":159,"updated":"2015-11-20 16:47:00.000000000","message":"same comment as above, this can be reduced to one check","commit_id":"08a30b6c93038b93a6820a934e12f679602b25c4"},{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"6680d75fd793fcd7269897c08ef83121321c10f0","unresolved":false,"context_lines":[{"line_number":170,"context_line":""},{"line_number":171,"context_line":"        if len(all_elements) \u003c 3:"},{"line_number":172,"context_line":"            error_msg \u003d \"Failed test_list_alarms_state_history_with_\" \\"},{"line_number":173,"context_line":"                        \"start_end_time: need 3 and more alarms state history \" \\"},{"line_number":174,"context_line":"                        \"to test.\""},{"line_number":175,"context_line":"            self.fail(error_msg)"},{"line_number":176,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ba8a016a_f101b06b","line":173,"updated":"2015-11-20 16:47:00.000000000","message":"I assume this is meant to be \"need 3 or more\" instead of \"need 3 and more\"","commit_id":"08a30b6c93038b93a6820a934e12f679602b25c4"},{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"6680d75fd793fcd7269897c08ef83121321c10f0","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        selected_set \u003d set([e[\u0027alarm_id\u0027] for e in selected_elements])"},{"line_number":194,"context_line":"        min_max_timestamp_set \u003d\\"},{"line_number":195,"context_line":"            set([e[\u0027alarm_id\u0027] for e in [min_element, max_element]])"},{"line_number":196,"context_line":"        # elements except for min \u0026 max timestamps are subset of #2"},{"line_number":197,"context_line":"        self.assertTrue(all_without_min_max_timestamp_set.issubset("},{"line_number":198,"context_line":"            selected_set))"},{"line_number":199,"context_line":"        # elements with min \u0026 max timestamps are not included in #2"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba8a016a_91d064f9","line":196,"updated":"2015-11-20 16:47:00.000000000","message":"same comment as above, this can be reduced to one check","commit_id":"08a30b6c93038b93a6820a934e12f679602b25c4"},{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"6680d75fd793fcd7269897c08ef83121321c10f0","unresolved":false,"context_lines":[{"line_number":294,"context_line":"            self.fail(error_msg)"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"    def _get_elements_with_min_max_timestamp(self, elements):"},{"line_number":297,"context_line":"        min_element \u003d None"},{"line_number":298,"context_line":"        max_element \u003d None"},{"line_number":299,"context_line":"        min_timestamp \u003d None"},{"line_number":300,"context_line":"        max_timestamp \u003d None"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba8a016a_364e4e97","line":297,"updated":"2015-11-20 16:47:00.000000000","message":"I think there is probably an easier way to accomplish this, such as sorting the list based on a key in each dictionary\n\nhttp://stackoverflow.com/questions/72899/how-do-i-sort-a-list-of-dictionaries-by-values-of-the-dictionary-in-python","commit_id":"08a30b6c93038b93a6820a934e12f679602b25c4"}]}
