)]}'
{"glance/tests/unit/test_scrubber.py":[{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"7f357b9cf0ef376ed91727cff345da3a404ca5c7","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import uuid"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import glance_store"},{"line_number":19,"context_line":"from mock import ANY"},{"line_number":20,"context_line":"from mock import patch"},{"line_number":21,"context_line":"from oslo_config import cfg"},{"line_number":22,"context_line":"# NOTE(jokke): simplified transition to py3, behaves like py2 xrange"},{"line_number":23,"context_line":"from six.moves import range"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a430d35_44b95dcb","line":20,"range":{"start_line":19,"start_character":0,"end_line":20,"end_character":22},"updated":"2017-02-08 19:05:07.000000000","message":"we can skip the lines and combine these to simply \n\n    import mock","commit_id":"a78d5df42ecf7217305fba0a9dcd7f96a6cda03a"}],"glance/tests/unit/v1/test_api.py":[{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"8c659fe2da9bc2997b01c316f444caaae81681c4","unresolved":false,"context_lines":[{"line_number":2037,"context_line":""},{"line_number":2038,"context_line":"            return orig_update_image_metadata(*args, **kwargs)"},{"line_number":2039,"context_line":""},{"line_number":2040,"context_line":"        # Monkey patch update_image_metadata function"},{"line_number":2041,"context_line":"        registry.update_image_metadata \u003d mock_update_image_metadata"},{"line_number":2042,"context_line":""},{"line_number":2043,"context_line":"        req \u003d unit_test_utils.get_fake_request(path\u003d\"/images/%s\" % image_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_313f28b5","line":2040,"updated":"2017-03-28 19:52:40.000000000","message":"Why is this not done with mock.patch? Similar below.","commit_id":"a127f65216a031046dbbfc4bd72e4b86c90c3396"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"c3a9870a3303d09a1a946bf703793b30bb2ef37a","unresolved":false,"context_lines":[{"line_number":2037,"context_line":""},{"line_number":2038,"context_line":"            return orig_update_image_metadata(*args, **kwargs)"},{"line_number":2039,"context_line":""},{"line_number":2040,"context_line":"        # Monkey patch update_image_metadata function"},{"line_number":2041,"context_line":"        registry.update_image_metadata \u003d mock_update_image_metadata"},{"line_number":2042,"context_line":""},{"line_number":2043,"context_line":"        req \u003d unit_test_utils.get_fake_request(path\u003d\"/images/%s\" % image_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_faa5ed9f","line":2040,"in_reply_to":"ffe62b97_313f28b5","updated":"2017-04-02 18:12:08.000000000","message":"The monkey patched function calls the original function on line 2038. I couldn\u0027t figure out how to do this with mock.patch. Any suggestions are appreciated.","commit_id":"a127f65216a031046dbbfc4bd72e4b86c90c3396"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"8c659fe2da9bc2997b01c316f444caaae81681c4","unresolved":false,"context_lines":[{"line_number":2069,"context_line":"    def test_delete_during_image_upload_by_admin(self):"},{"line_number":2070,"context_line":"        self._check_delete_during_image_upload(is_admin\u003dTrue)"},{"line_number":2071,"context_line":""},{"line_number":2072,"context_line":"    def test_alex(self):"},{"line_number":2073,"context_line":"        self._check_delete_during_image_upload(is_admin\u003dFalse)"},{"line_number":2074,"context_line":"        self._check_delete_during_image_upload(is_admin\u003dTrue)"},{"line_number":2075,"context_line":""},{"line_number":2076,"context_line":"    def test_disable_purge_props(self):"},{"line_number":2077,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_712490af","line":2074,"range":{"start_line":2072,"start_character":0,"end_line":2074,"end_character":61},"updated":"2017-03-28 19:52:40.000000000","message":"remove","commit_id":"a127f65216a031046dbbfc4bd72e4b86c90c3396"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"c3a9870a3303d09a1a946bf703793b30bb2ef37a","unresolved":false,"context_lines":[{"line_number":2069,"context_line":"    def test_delete_during_image_upload_by_admin(self):"},{"line_number":2070,"context_line":"        self._check_delete_during_image_upload(is_admin\u003dTrue)"},{"line_number":2071,"context_line":""},{"line_number":2072,"context_line":"    def test_alex(self):"},{"line_number":2073,"context_line":"        self._check_delete_during_image_upload(is_admin\u003dFalse)"},{"line_number":2074,"context_line":"        self._check_delete_during_image_upload(is_admin\u003dTrue)"},{"line_number":2075,"context_line":""},{"line_number":2076,"context_line":"    def test_disable_purge_props(self):"},{"line_number":2077,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_3aceb559","line":2074,"range":{"start_line":2072,"start_character":0,"end_line":2074,"end_character":61},"in_reply_to":"ffe62b97_712490af","updated":"2017-04-02 18:12:08.000000000","message":"Oops, good catch.","commit_id":"a127f65216a031046dbbfc4bd72e4b86c90c3396"}],"glance/tests/unit/v1/test_registry_client.py":[{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"8c659fe2da9bc2997b01c316f444caaae81681c4","unresolved":false,"context_lines":[{"line_number":922,"context_line":"        self.config(admin_tenant_name\u003dexpected[\u0027tenant\u0027])"},{"line_number":923,"context_line":"        self.config(auth_strategy\u003dexpected[\u0027strategy\u0027])"},{"line_number":924,"context_line":"        self.config(auth_region\u003dexpected[\u0027region\u0027])"},{"line_number":925,"context_line":"        self.stubs.Set(os, \u0027getenv\u0027, lambda x: None)"},{"line_number":926,"context_line":""},{"line_number":927,"context_line":"        self.assertIsNone(rapi._CLIENT_CREDS)"},{"line_number":928,"context_line":"        rapi.configure_registry_admin_creds()"}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_f1e0a028","side":"PARENT","line":925,"updated":"2017-03-28 19:52:40.000000000","message":"I don\u0027t understand why this used to be \"needed\" but isn\u0027t any longer","commit_id":"b702bce146923f3b030179880c56c0e84f7063a8"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"c3a9870a3303d09a1a946bf703793b30bb2ef37a","unresolved":false,"context_lines":[{"line_number":922,"context_line":"        self.config(admin_tenant_name\u003dexpected[\u0027tenant\u0027])"},{"line_number":923,"context_line":"        self.config(auth_strategy\u003dexpected[\u0027strategy\u0027])"},{"line_number":924,"context_line":"        self.config(auth_region\u003dexpected[\u0027region\u0027])"},{"line_number":925,"context_line":"        self.stubs.Set(os, \u0027getenv\u0027, lambda x: None)"},{"line_number":926,"context_line":""},{"line_number":927,"context_line":"        self.assertIsNone(rapi._CLIENT_CREDS)"},{"line_number":928,"context_line":"        rapi.configure_registry_admin_creds()"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfeb2761_a81d7b74","side":"PARENT","line":925,"in_reply_to":"ffe62b97_f1e0a028","updated":"2017-04-02 18:12:08.000000000","message":"To the best of my understanding, the original creator of this test had the \u0027OS_AUTH_URL\u0027 variable defined in their tox environment and thus added this stub so that the \u0027auth_strategy\u0027 does not get overwritten by that value inside the \u0027configure_registry_admin_creds()\u0027 function. In my opinion this stub should not be needed.","commit_id":"b702bce146923f3b030179880c56c0e84f7063a8"}],"glance/tests/unit/v2/test_images_resource.py":[{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"8c659fe2da9bc2997b01c316f444caaae81681c4","unresolved":false,"context_lines":[{"line_number":1836,"context_line":"        as long as the image has fewer than the limited number of image"},{"line_number":1837,"context_line":"        locations after the transaction."},{"line_number":1838,"context_line":"        \"\"\""},{"line_number":1839,"context_line":"        self.stubs.Set(store, \u0027get_size_from_backend\u0027,"},{"line_number":1840,"context_line":"                       unit_test_utils.fake_get_size_from_backend)"},{"line_number":1841,"context_line":"        self.config(show_multiple_locations\u003dTrue)"},{"line_number":1842,"context_line":"        request \u003d unit_test_utils.get_fake_request()"},{"line_number":1843,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_f1fc20b6","side":"PARENT","line":1840,"range":{"start_line":1839,"start_character":0,"end_line":1840,"end_character":66},"updated":"2017-03-28 19:52:40.000000000","message":"this is removed without being mocked in many places in this review. quite odd that this doesn\u0027t cause a problem in the tests and makes me suspicious of the tests not doing a good job with their assertions in all cases (that is to say, I am concerned that the tests don\u0027t actually evaluate the right conditions to verify what they suggest they do).","commit_id":"b702bce146923f3b030179880c56c0e84f7063a8"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"c3a9870a3303d09a1a946bf703793b30bb2ef37a","unresolved":false,"context_lines":[{"line_number":1836,"context_line":"        as long as the image has fewer than the limited number of image"},{"line_number":1837,"context_line":"        locations after the transaction."},{"line_number":1838,"context_line":"        \"\"\""},{"line_number":1839,"context_line":"        self.stubs.Set(store, \u0027get_size_from_backend\u0027,"},{"line_number":1840,"context_line":"                       unit_test_utils.fake_get_size_from_backend)"},{"line_number":1841,"context_line":"        self.config(show_multiple_locations\u003dTrue)"},{"line_number":1842,"context_line":"        request \u003d unit_test_utils.get_fake_request()"},{"line_number":1843,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"dfeb2761_73f648fc","side":"PARENT","line":1840,"range":{"start_line":1839,"start_character":0,"end_line":1840,"end_character":66},"in_reply_to":"ffe62b97_f1fc20b6","updated":"2017-04-02 18:12:08.000000000","message":"Faking the image size returned from backend store does not seem to be necessary in unit tests due to the following exception catch in the glance quota implementation: https://github.com/openstack/glance/blob/master/glance/quota/__init__.py#L62\n\nAs far as I can tell from looking at the blame history, this has never been necessary. It does seem like this leaves some potential holes in our tests. However, I\u0027m not sure those are best plugged in this patch or a different one. What do other reviewers think?","commit_id":"b702bce146923f3b030179880c56c0e84f7063a8"}],"glance/tests/unit/v2/test_registry_client.py":[{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"8c659fe2da9bc2997b01c316f444caaae81681c4","unresolved":false,"context_lines":[{"line_number":763,"context_line":"        self.config(admin_tenant_name\u003dexpected[\u0027tenant\u0027])"},{"line_number":764,"context_line":"        self.config(auth_strategy\u003dexpected[\u0027strategy\u0027])"},{"line_number":765,"context_line":"        self.config(auth_region\u003dexpected[\u0027region\u0027])"},{"line_number":766,"context_line":"        self.stubs.Set(os, \u0027getenv\u0027, lambda x: None)"},{"line_number":767,"context_line":""},{"line_number":768,"context_line":"        self.assertIsNone(rapi._CLIENT_CREDS)"},{"line_number":769,"context_line":"        rapi.configure_registry_admin_creds()"}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_f1b9c014","side":"PARENT","line":766,"updated":"2017-03-28 19:52:40.000000000","message":"as noted in another file, why is this not a problem that it doesn\u0027t get stubbed anymore?","commit_id":"b702bce146923f3b030179880c56c0e84f7063a8"}]}
