)]}'
{"refstack/api/controllers/validation.py":[{"author":{"_account_id":9626,"name":"Paul Van Eck","email":"pvaneck@us.ibm.com","username":"pvaneck"},"change_message_id":"ec494ba61f070aef13e72785049cc9698e9c6c14","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        \"\"\"POST handler.\"\"\""},{"line_number":64,"context_line":"        try:"},{"line_number":65,"context_line":"            self.validator.validate(pecan.request)"},{"line_number":66,"context_line":"        except api_exc.ValidationError as e:"},{"line_number":67,"context_line":"            LOG.debug(\"validation error happens %s\" % e)"},{"line_number":68,"context_line":"            pecan.response.status \u003d 400"},{"line_number":69,"context_line":"            return {\u0027Test result validation error happened\u0027: 400}"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_aae604b2","line":66,"updated":"2015-09-28 22:04:16.000000000","message":"Don\u0027t think any of the code in this file is necessary. Raising a validation error will automatically translate into a 400 error http response in api/app.py. So this file can be left untouched.","commit_id":"31ea4cafc8577ff7c44f11bdc85a667428d6b613"},{"author":{"_account_id":17700,"name":"David Liu","email":"david.liu@cn.ibm.com","username":"lzbj"},"change_message_id":"2056364d1745a9c4d84bcc33833de39319d68bb7","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        \"\"\"POST handler.\"\"\""},{"line_number":64,"context_line":"        try:"},{"line_number":65,"context_line":"            self.validator.validate(pecan.request)"},{"line_number":66,"context_line":"        except api_exc.ValidationError as e:"},{"line_number":67,"context_line":"            LOG.debug(\"validation error happens %s\" % e)"},{"line_number":68,"context_line":"            pecan.response.status \u003d 400"},{"line_number":69,"context_line":"            return {\u0027Test result validation error happened\u0027: 400}"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_26f1c301","line":66,"in_reply_to":"9a1a9d01_aae604b2","updated":"2015-09-29 04:47:28.000000000","message":"Correct, restore it.","commit_id":"31ea4cafc8577ff7c44f11bdc85a667428d6b613"}],"refstack/api/validators.py":[{"author":{"_account_id":9626,"name":"Paul Van Eck","email":"pvaneck@us.ibm.com","username":"pvaneck"},"change_message_id":"ec494ba61f070aef13e72785049cc9698e9c6c14","unresolved":false,"context_lines":[{"line_number":124,"context_line":"            if not signer.verify(data_hash, sign):"},{"line_number":125,"context_line":"                raise api_exc.ValidationError(\u0027Signature verification failed\u0027)"},{"line_number":126,"context_line":"        if self._is_empty_result(request):"},{"line_number":127,"context_line":"            raise api_exc.ValidationError(\u0027Empty test result detected\u0027)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def _is_empty_result(self, request):"},{"line_number":130,"context_line":"        \"\"\"check if the test results is empty.\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_8a045b18","line":127,"updated":"2015-09-28 22:04:16.000000000","message":"Change the message to make it clear that empty test results are not allowed.\n\nSuggestion: \u0027Uploaded results must contain at least one passing test.\u0027","commit_id":"31ea4cafc8577ff7c44f11bdc85a667428d6b613"},{"author":{"_account_id":17700,"name":"David Liu","email":"david.liu@cn.ibm.com","username":"lzbj"},"change_message_id":"2056364d1745a9c4d84bcc33833de39319d68bb7","unresolved":false,"context_lines":[{"line_number":124,"context_line":"            if not signer.verify(data_hash, sign):"},{"line_number":125,"context_line":"                raise api_exc.ValidationError(\u0027Signature verification failed\u0027)"},{"line_number":126,"context_line":"        if self._is_empty_result(request):"},{"line_number":127,"context_line":"            raise api_exc.ValidationError(\u0027Empty test result detected\u0027)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def _is_empty_result(self, request):"},{"line_number":130,"context_line":"        \"\"\"check if the test results is empty.\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_66d25b5e","line":127,"in_reply_to":"9a1a9d01_8a045b18","updated":"2015-09-29 04:47:28.000000000","message":"Agree.","commit_id":"31ea4cafc8577ff7c44f11bdc85a667428d6b613"},{"author":{"_account_id":9626,"name":"Paul Van Eck","email":"pvaneck@us.ibm.com","username":"pvaneck"},"change_message_id":"ec494ba61f070aef13e72785049cc9698e9c6c14","unresolved":false,"context_lines":[{"line_number":127,"context_line":"            raise api_exc.ValidationError(\u0027Empty test result detected\u0027)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def _is_empty_result(self, request):"},{"line_number":130,"context_line":"        \"\"\"check if the test results is empty.\"\"\""},{"line_number":131,"context_line":"        body \u003d json.loads(request.body)"},{"line_number":132,"context_line":"        if len(body[\u0027results\u0027]) !\u003d 0:"},{"line_number":133,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_0d55c5f8","line":130,"updated":"2015-09-28 22:04:16.000000000","message":"nitpick, suggest docstring to be:\n\n\"\"\"Check if the test results list is empty.\"\"\"","commit_id":"31ea4cafc8577ff7c44f11bdc85a667428d6b613"},{"author":{"_account_id":17700,"name":"David Liu","email":"david.liu@cn.ibm.com","username":"lzbj"},"change_message_id":"2056364d1745a9c4d84bcc33833de39319d68bb7","unresolved":false,"context_lines":[{"line_number":127,"context_line":"            raise api_exc.ValidationError(\u0027Empty test result detected\u0027)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def _is_empty_result(self, request):"},{"line_number":130,"context_line":"        \"\"\"check if the test results is empty.\"\"\""},{"line_number":131,"context_line":"        body \u003d json.loads(request.body)"},{"line_number":132,"context_line":"        if len(body[\u0027results\u0027]) !\u003d 0:"},{"line_number":133,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_86d76f4a","line":130,"in_reply_to":"9a1a9d01_0d55c5f8","updated":"2015-09-29 04:47:28.000000000","message":"Agree.","commit_id":"31ea4cafc8577ff7c44f11bdc85a667428d6b613"},{"author":{"_account_id":10526,"name":"Catherine Diep","email":"cdiep@us.ibm.com","username":"cdiep"},"change_message_id":"259a7e58716e0912931ec42c387683c36d9867c3","unresolved":false,"context_lines":[{"line_number":125,"context_line":"                raise api_exc.ValidationError(\u0027Signature verification failed\u0027)"},{"line_number":126,"context_line":"        if self._is_empty_result(request):"},{"line_number":127,"context_line":"            raise api_exc.ValidationError(\u0027Uploaded results must contain at least \\"},{"line_number":128,"context_line":"                                           one passing test.\u0027)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def _is_empty_result(self, request):"},{"line_number":131,"context_line":"        \"\"\"Check if the test results list is empty.\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_ee558bf9","line":128,"updated":"2015-09-30 18:11:30.000000000","message":"Returned error message shows a large number of blank spaces between the words \"least\" and \"one\".\n\n   {\"code\": 400, \"detail\": \"Uploaded results must contain at least                                           one passing test.\", \"title\": \"Uploaded results must contain at least                                           one passing test.\"}","commit_id":"7efaa605b481d67e177614b168fb97b4f7a5762c"},{"author":{"_account_id":17700,"name":"David Liu","email":"david.liu@cn.ibm.com","username":"lzbj"},"change_message_id":"d85f0977f270de63803e9c6c6541a3394b58c782","unresolved":false,"context_lines":[{"line_number":125,"context_line":"                raise api_exc.ValidationError(\u0027Signature verification failed\u0027)"},{"line_number":126,"context_line":"        if self._is_empty_result(request):"},{"line_number":127,"context_line":"            raise api_exc.ValidationError(\u0027Uploaded results must contain at least \\"},{"line_number":128,"context_line":"                                           one passing test.\u0027)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def _is_empty_result(self, request):"},{"line_number":131,"context_line":"        \"\"\"Check if the test results list is empty.\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_810c6295","line":128,"in_reply_to":"9a1a9d01_2bf7baf6","updated":"2015-10-05 04:07:32.000000000","message":"Yes, fixed, thank you Daryl.","commit_id":"7efaa605b481d67e177614b168fb97b4f7a5762c"},{"author":{"_account_id":97,"name":"Daryl Walleck","email":"daryl.walleck@rackspace.com","username":"dwalleck"},"change_message_id":"c5fe126b3f7f9e722e52f0834fde697671e9c705","unresolved":false,"context_lines":[{"line_number":125,"context_line":"                raise api_exc.ValidationError(\u0027Signature verification failed\u0027)"},{"line_number":126,"context_line":"        if self._is_empty_result(request):"},{"line_number":127,"context_line":"            raise api_exc.ValidationError(\u0027Uploaded results must contain at least \\"},{"line_number":128,"context_line":"                                           one passing test.\u0027)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def _is_empty_result(self, request):"},{"line_number":131,"context_line":"        \"\"\"Check if the test results list is empty.\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_2bf7baf6","line":128,"in_reply_to":"9a1a9d01_ee558bf9","updated":"2015-10-01 21:27:05.000000000","message":"Yeah, the line continuation isn\u0027t what you want here. This should work:\n\n\n    raise api_exc.ValidationError(\u0027Uploaded results must contain at least \u0027\n                                  \u0027one passing test\u0027)","commit_id":"7efaa605b481d67e177614b168fb97b4f7a5762c"},{"author":{"_account_id":17700,"name":"David Liu","email":"david.liu@cn.ibm.com","username":"lzbj"},"change_message_id":"d85f0977f270de63803e9c6c6541a3394b58c782","unresolved":false,"context_lines":[{"line_number":125,"context_line":"                raise api_exc.ValidationError(\u0027Signature verification failed\u0027)"},{"line_number":126,"context_line":"        if self._is_empty_result(request):"},{"line_number":127,"context_line":"            raise api_exc.ValidationError(\u0027Uploaded results must contain at least \\"},{"line_number":128,"context_line":"                                           one passing test.\u0027)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def _is_empty_result(self, request):"},{"line_number":131,"context_line":"        \"\"\"Check if the test results list is empty.\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_214556b2","line":128,"in_reply_to":"9a1a9d01_ee558bf9","updated":"2015-10-05 04:07:32.000000000","message":"Yes, fixed with patch 8.","commit_id":"7efaa605b481d67e177614b168fb97b4f7a5762c"}],"refstack/tests/api/test_api.py":[{"author":{"_account_id":9626,"name":"Paul Van Eck","email":"pvaneck@us.ibm.com","username":"pvaneck"},"change_message_id":"ec494ba61f070aef13e72785049cc9698e9c6c14","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def test_post_with_empty_result(self):"},{"line_number":68,"context_line":"        \"\"\"Test results endpoint with empty test results request.\"\"\""},{"line_number":69,"context_line":"        results \u003d json.dumps(FAKE_JSON_WITH_EMPTY_RESULTS)"},{"line_number":70,"context_line":"        actual_response \u003d self.post_json(self.URL, params\u003dresults)"},{"line_number":71,"context_line":"        self.assertIn(\u0027empty results not allowed\u0027, actual_response)"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_8aa8db21","line":69,"updated":"2015-09-28 22:04:16.000000000","message":"Tests in this file are functional tests and can be ran using the\ncommand \u0027tox -v -epy27-func-mysql\u0027. However, since Jenkins doesn\u0027t run the functional tests, they seem to have been neglected over time, as there are some failures. I\u0027ve submitted a patch to fix them (https://review.openstack.org/#/c/228633/).\n\nIn the meantime, try running this locally with the above fix to see if you can get a pass, as I believe this will currently fail.\n\nI think just taking the assertRaises in the below method test_post_with_invalid_schema and copying it here should be sufficient.","commit_id":"31ea4cafc8577ff7c44f11bdc85a667428d6b613"},{"author":{"_account_id":17700,"name":"David Liu","email":"david.liu@cn.ibm.com","username":"lzbj"},"change_message_id":"2056364d1745a9c4d84bcc33833de39319d68bb7","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def test_post_with_empty_result(self):"},{"line_number":68,"context_line":"        \"\"\"Test results endpoint with empty test results request.\"\"\""},{"line_number":69,"context_line":"        results \u003d json.dumps(FAKE_JSON_WITH_EMPTY_RESULTS)"},{"line_number":70,"context_line":"        actual_response \u003d self.post_json(self.URL, params\u003dresults)"},{"line_number":71,"context_line":"        self.assertIn(\u0027empty results not allowed\u0027, actual_response)"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_6639fba3","line":69,"in_reply_to":"9a1a9d01_8aa8db21","updated":"2015-09-29 04:47:28.000000000","message":"I didn\u0027t run this command before, now it\u0027s passed with your suggestions and fix, thank you Paul.","commit_id":"31ea4cafc8577ff7c44f11bdc85a667428d6b613"}]}
