)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"7e7b1d6e631dfc21487688bcf7a2095b99669488","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"68111379_a150a577","updated":"2022-07-07 20:58:30.000000000","message":"Hey HanGuangyu, are you willing to include Abhishek\u0027s suggestion?","commit_id":"e29a9884e3cc21a5ff45af43480337d7fa627f1c"},{"author":{"_account_id":33786,"name":"HanGuangyu","email":"hanguangyu2@gmail.com","username":"hanguangyu"},"change_message_id":"40d3dfa46ade872d503e8ad0ddfa70a7a853e151","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"e7753de7_9d804afa","updated":"2022-04-14 13:56:16.000000000","message":"Hi, sorry for my weak ability and so delay to do this. \n\nI try to add unit test today, but so sorry that I don\u0027t implement it now. This is my first learn about unit test of glance.\nI wanted to add test to \u0027class ServerTest\u0027 of glance/tests/unit/common/test_wsgi.py. And simulate the image creating process to assert Exception. But I have no idea to implement it.\n\n```\n    @mock.patch.object(prefetcher, \u0027Prefetcher\u0027)\n    @mock.patch.object(wsgi.Server, \u0027configure_socket\u0027)\n    def test_non_existing_property_protection_file(self, mock_configure_socket,\n                                         mock_prefetcher):\n        \"\"\"\"\"\"\n        self.config(property_protection_file\u003d\u0027non_existing_file.yaml\u0027)\n        self.config(property_protection_rule_format\u003d\u0027policies\u0027)\n\n        server \u003d wsgi.Server(threads\u003d1, initialize_glance_store\u003dTrue)\n\n        # create image\n\n        # self.assertRaises()\n```\n\nCould I get some help? So sorry","commit_id":"e29a9884e3cc21a5ff45af43480337d7fa627f1c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"fb148855848431775e5e6a817ab0bff3dbb09492","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"1a53ed54_a9758506","updated":"2021-11-30 05:23:39.000000000","message":"Need unit test for coverage.","commit_id":"e29a9884e3cc21a5ff45af43480337d7fa627f1c"},{"author":{"_account_id":33786,"name":"HanGuangyu","email":"hanguangyu2@gmail.com","username":"hanguangyu"},"change_message_id":"8cb1a762cd1dd4322e160c087c0ca08e0327949c","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"c0ad75e0_6ec91229","in_reply_to":"1a53ed54_a9758506","updated":"2021-11-30 05:34:46.000000000","message":"Sorry for my ignorance, how can I get a \"unit test\" in the patch? Or In which document I can learn about it?","commit_id":"e29a9884e3cc21a5ff45af43480337d7fa627f1c"},{"author":{"_account_id":33786,"name":"HanGuangyu","email":"hanguangyu2@gmail.com","username":"hanguangyu"},"change_message_id":"9928a0e4bfb4247440450474788883faeda8a960","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"92ad359a_ccc5a0c6","in_reply_to":"38104c0a_203956bc","updated":"2022-04-20 01:33:21.000000000","message":"Very very appreciate you! Best wishes to you! so sorry to bother you such\n\nI will strengthen my learning of Glance and Python too.","commit_id":"e29a9884e3cc21a5ff45af43480337d7fa627f1c"},{"author":{"_account_id":33786,"name":"HanGuangyu","email":"hanguangyu2@gmail.com","username":"hanguangyu"},"change_message_id":"8484ef6be90cc77cdfa81d11a7f85312c6fa7936","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"bda0fd4e_b4368fa7","in_reply_to":"75275c7f_7eae633b","updated":"2021-11-30 07:41:16.000000000","message":"Ok, thank you, I will do it","commit_id":"e29a9884e3cc21a5ff45af43480337d7fa627f1c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"a898e7d2ca57a6adf47b52c5af166351e8f7a469","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"9fddf9a4_afc654f7","in_reply_to":"92ad359a_ccc5a0c6","updated":"2022-04-20 05:25:27.000000000","message":"No worries,\n\nYou can add below test to glance/tests/unit/common/test_wsgi.py after test \u0027test_dispatch_no_default\u0027\n\n\n\n    def test_dispatch_riases_bad_request(self):\n        class FakeController(object):\n            def index(self, shirt, pants\u003dNone):\n                return (shirt, pants)\n\n        resource \u003d wsgi.Resource(FakeController(), None, None)\n\n        def dispatch(self, obj, action, *args, **kwargs):\n            raise exception.InvalidPropertyProtectionConfiguration()\n\n        self.mock_object(wsgi.Resource, \u0027dispatch\u0027, dispatch)\n        request \u003d wsgi.Request.blank(\u0027/\u0027)\n        self.assertRaises(webob.exc.HTTPBadRequest, resource.__call__,\n                          request)","commit_id":"e29a9884e3cc21a5ff45af43480337d7fa627f1c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"577d244e010c4170e035aa4af76bfb36a4942d5a","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"75275c7f_7eae633b","in_reply_to":"b409df95_9f4d360e","updated":"2021-11-30 07:39:03.000000000","message":"You can add it here, you need to use mock or use self.config() method to set non existing file in the configuration (as done here [1]) and verify that it returns 400 error.\n\n[1] https://opendev.org/openstack/glance/src/branch/master/glance/tests/unit/common/test_wsgi.py#L577","commit_id":"e29a9884e3cc21a5ff45af43480337d7fa627f1c"},{"author":{"_account_id":33786,"name":"HanGuangyu","email":"hanguangyu2@gmail.com","username":"hanguangyu"},"change_message_id":"d6b2f235f0ca04818459f685f023c3237efa3b0e","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"b409df95_9f4d360e","in_reply_to":"c0ad75e0_6ec91229","updated":"2021-11-30 07:34:46.000000000","message":"Is there: https://opendev.org/openstack/glance/src/branch/master/glance/tests/unit/common/test_wsgi.py. I should add a unit test in it?","commit_id":"e29a9884e3cc21a5ff45af43480337d7fa627f1c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"1d6969d8f1c10be855e58a9a27347467482049f2","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"38104c0a_203956bc","in_reply_to":"e7753de7_9d804afa","updated":"2022-04-14 14:10:33.000000000","message":"Hey HanGuangyu,\n\nwill have a look at it early next week and give you some pointers.\n\nAbhishek","commit_id":"e29a9884e3cc21a5ff45af43480337d7fa627f1c"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"bb27b5eb40b652a2d5541afa3541d2c4df0de9ce","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"61a3431c_71a299fa","updated":"2022-08-02 13:00:14.000000000","message":"I only removed an empty line, so I feel fine +2ing this :)","commit_id":"4e59a04d27175533d7ae91b9acd23ffe32a5917a"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"743101702c320d7ddaec046ff443fe28a1fcd789","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"59b88c50_aff175d4","updated":"2022-08-01 17:40:28.000000000","message":"I rebased the patch, fixed the PEP8 issue that prevented us from merging PS4, fixed a typo in the test name, fixed a typo in the commit message.","commit_id":"4e59a04d27175533d7ae91b9acd23ffe32a5917a"}]}
