)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"3217a8011991f8d2f0681c7de25f6b5c6836a62c","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Unittests for several internal methods added:"},{"line_number":19,"context_line":"catch_error; env; create_options; parse_options; lookup_command"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: Id07bbecdc9877268a514e3a594699364dcc4618f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"AAAATn%2F%2FNXs%3D","line":20,"updated":"2013-11-13 05:11:37.000000000","message":"It would be great if you can have a bug for this, good for tracking purposes.","commit_id":"342a0a4edc071c46056869fc9c705657dd9cc247"},{"author":{"_account_id":8689,"name":"Vitaliy Kolosov","email":"vkolosov@yahoo-inc.com","username":"VKolosov"},"change_message_id":"0a72943288b3177f5463ace290492d693298d061","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Unittests for several internal methods added:"},{"line_number":19,"context_line":"catch_error; env; create_options; parse_options; lookup_command"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: Id07bbecdc9877268a514e3a594699364dcc4618f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"AAAATn%2F%2FKgI%3D","line":20,"in_reply_to":"AAAATn%2F%2FNXs%3D","updated":"2013-11-13 14:28:32.000000000","message":"Done","commit_id":"342a0a4edc071c46056869fc9c705657dd9cc247"}],"glance/tests/unit/api/test_cmd_cache_manage.py":[{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"db640e662523c26adfefa64056e830f481e65300","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class TestGlanceCmdManage(test_utils.BaseTestCase):"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    # Verify that list_cached() method correctly processes images with all"},{"line_number":27,"context_line":"    # filled data and images with not filled \u0027last_accessed\u0027 field."},{"line_number":28,"context_line":"    @mock.patch.object(glance.image_cache.client.CacheClient,"},{"line_number":29,"context_line":"                       \u0027get_cached_images\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATH%2F%2FQi8%3D","line":26,"updated":"2013-10-18 22:28:36.000000000","message":"Can you follow the Docstring guidelines located here: http://docs.openstack.org/developer/hacking/","commit_id":"e8c8738d26320cd155c1b40b1ee05e542679062b"},{"author":{"_account_id":8689,"name":"Vitaliy Kolosov","email":"vkolosov@yahoo-inc.com","username":"VKolosov"},"change_message_id":"7ad5baf7c520c07ff8da42f5b2e567ea350b70ac","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class TestGlanceCmdManage(test_utils.BaseTestCase):"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    # Verify that list_cached() method correctly processes images with all"},{"line_number":27,"context_line":"    # filled data and images with not filled \u0027last_accessed\u0027 field."},{"line_number":28,"context_line":"    @mock.patch.object(glance.image_cache.client.CacheClient,"},{"line_number":29,"context_line":"                       \u0027get_cached_images\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2F%2BYE%3D","line":26,"in_reply_to":"AAAATH%2F%2FQi8%3D","updated":"2013-10-24 13:05:45.000000000","message":"Done","commit_id":"e8c8738d26320cd155c1b40b1ee05e542679062b"},{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"db640e662523c26adfefa64056e830f481e65300","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    # Verify that list_cached() method correctly processes images with all"},{"line_number":27,"context_line":"    # filled data and images with not filled \u0027last_accessed\u0027 field."},{"line_number":28,"context_line":"    @mock.patch.object(glance.image_cache.client.CacheClient,"},{"line_number":29,"context_line":"                       \u0027get_cached_images\u0027)"},{"line_number":30,"context_line":"    @mock.patch.object(glance.common.utils.PrettyTable, \u0027make_row\u0027)"},{"line_number":31,"context_line":"    def test_list_cached_images(self, mock_row_create, mock_images):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATH%2F%2FQis%3D","line":28,"updated":"2013-10-18 22:28:36.000000000","message":"I think i would prefer using the context manager instead of this decorator. This will make it easier to read imo and also removes the need for arguments in the test function.\n\ninstead just do:\nwith mock.patch.object():\n\ninside of the test function, and only have calls that need the mocking inside of the code block.","commit_id":"e8c8738d26320cd155c1b40b1ee05e542679062b"},{"author":{"_account_id":8689,"name":"Vitaliy Kolosov","email":"vkolosov@yahoo-inc.com","username":"VKolosov"},"change_message_id":"7ad5baf7c520c07ff8da42f5b2e567ea350b70ac","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    # Verify that list_cached() method correctly processes images with all"},{"line_number":27,"context_line":"    # filled data and images with not filled \u0027last_accessed\u0027 field."},{"line_number":28,"context_line":"    @mock.patch.object(glance.image_cache.client.CacheClient,"},{"line_number":29,"context_line":"                       \u0027get_cached_images\u0027)"},{"line_number":30,"context_line":"    @mock.patch.object(glance.common.utils.PrettyTable, \u0027make_row\u0027)"},{"line_number":31,"context_line":"    def test_list_cached_images(self, mock_row_create, mock_images):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2F%2Buo%3D","line":28,"in_reply_to":"AAAATH%2F%2FQis%3D","updated":"2013-10-24 13:05:45.000000000","message":"As it was discussed on one ot team meetings (http://eavesdrop.openstack.org/meetings/glance/2013/glance.2013-10-17-20.01.log.html), it is acceptable approach to avoid multiple nesting.","commit_id":"e8c8738d26320cd155c1b40b1ee05e542679062b"},{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"db640e662523c26adfefa64056e830f481e65300","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    def test_list_cached_images_empty(self, mock_images):"},{"line_number":54,"context_line":"        mock_images.return_value \u003d []"},{"line_number":55,"context_line":"        cache_manage.list_cached(mock.Mock(), \u0027\u0027)"},{"line_number":56,"context_line":"        self.assertTrue(True)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    # Verify that list_queued() method correctly processes images."},{"line_number":59,"context_line":"    @mock.patch.object(glance.image_cache.client.CacheClient,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATH%2F%2FQiI%3D","line":56,"updated":"2013-10-18 22:28:36.000000000","message":"this assert doesn\u0027t do anything?","commit_id":"e8c8738d26320cd155c1b40b1ee05e542679062b"},{"author":{"_account_id":8689,"name":"Vitaliy Kolosov","email":"vkolosov@yahoo-inc.com","username":"VKolosov"},"change_message_id":"7ad5baf7c520c07ff8da42f5b2e567ea350b70ac","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    def test_list_cached_images_empty(self, mock_images):"},{"line_number":54,"context_line":"        mock_images.return_value \u003d []"},{"line_number":55,"context_line":"        cache_manage.list_cached(mock.Mock(), \u0027\u0027)"},{"line_number":56,"context_line":"        self.assertTrue(True)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    # Verify that list_queued() method correctly processes images."},{"line_number":59,"context_line":"    @mock.patch.object(glance.image_cache.client.CacheClient,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2F%2BuM%3D","line":56,"in_reply_to":"AAAATH%2F%2FQiI%3D","updated":"2013-10-24 13:05:45.000000000","message":"This test is intended to check error absence during the method execution. Acceptable result is \"no error\". To mark it I decided to place positive assert here because no asserts in a test at all looks queer.","commit_id":"e8c8738d26320cd155c1b40b1ee05e542679062b"},{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"db640e662523c26adfefa64056e830f481e65300","unresolved":false,"context_lines":[{"line_number":79,"context_line":"    def test_list_queued_images_empty(self, mock_images):"},{"line_number":80,"context_line":"        mock_images.return_value \u003d []"},{"line_number":81,"context_line":"        cache_manage.list_queued(mock.Mock(), \u0027\u0027)"},{"line_number":82,"context_line":"        self.assertTrue(True)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def test_queue_image_without_index(self):"},{"line_number":85,"context_line":"        self.assertEquals(cache_manage.queue_image(mock.Mock(), []),"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATH%2F%2FQhw%3D","line":82,"updated":"2013-10-18 22:28:36.000000000","message":"same here","commit_id":"e8c8738d26320cd155c1b40b1ee05e542679062b"},{"author":{"_account_id":8689,"name":"Vitaliy Kolosov","email":"vkolosov@yahoo-inc.com","username":"VKolosov"},"change_message_id":"7ad5baf7c520c07ff8da42f5b2e567ea350b70ac","unresolved":false,"context_lines":[{"line_number":79,"context_line":"    def test_list_queued_images_empty(self, mock_images):"},{"line_number":80,"context_line":"        mock_images.return_value \u003d []"},{"line_number":81,"context_line":"        cache_manage.list_queued(mock.Mock(), \u0027\u0027)"},{"line_number":82,"context_line":"        self.assertTrue(True)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def test_queue_image_without_index(self):"},{"line_number":85,"context_line":"        self.assertEquals(cache_manage.queue_image(mock.Mock(), []),"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2F%2BuI%3D","line":82,"in_reply_to":"AAAATH%2F%2FQhw%3D","updated":"2013-10-24 13:05:45.000000000","message":"The same as the previous one.","commit_id":"e8c8738d26320cd155c1b40b1ee05e542679062b"},{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"db640e662523c26adfefa64056e830f481e65300","unresolved":false,"context_lines":[{"line_number":148,"context_line":"            cache_manage.delete_cached_image(mock_options, [\u0027img_id\u0027]),"},{"line_number":149,"context_line":"            cache_manage.SUCCESS)"},{"line_number":150,"context_line":"        self.assertTrue(mock_client.called)"},{"line_number":151,"context_line":"        self.assertTrue(\u0027mock_client().delete_cached_image\u0027 in"},{"line_number":152,"context_line":"                        manager.mock_calls[1])"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    # options.forced set to False and delete confirmation set to False"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATH%2F%2FQh8%3D","line":151,"updated":"2013-10-18 22:28:36.000000000","message":"I think there may be a cleaner way to assert these calls. Maybe the mock.assert_called_once_with function?","commit_id":"e8c8738d26320cd155c1b40b1ee05e542679062b"},{"author":{"_account_id":8689,"name":"Vitaliy Kolosov","email":"vkolosov@yahoo-inc.com","username":"VKolosov"},"change_message_id":"7ad5baf7c520c07ff8da42f5b2e567ea350b70ac","unresolved":false,"context_lines":[{"line_number":148,"context_line":"            cache_manage.delete_cached_image(mock_options, [\u0027img_id\u0027]),"},{"line_number":149,"context_line":"            cache_manage.SUCCESS)"},{"line_number":150,"context_line":"        self.assertTrue(mock_client.called)"},{"line_number":151,"context_line":"        self.assertTrue(\u0027mock_client().delete_cached_image\u0027 in"},{"line_number":152,"context_line":"                        manager.mock_calls[1])"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    # options.forced set to False and delete confirmation set to False"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2F%2BLg%3D","line":151,"in_reply_to":"AAAATH%2F%2FQh8%3D","updated":"2013-10-24 13:05:45.000000000","message":"I don\u0027t mock \"delete_cached_image\" here, so I can\u0027t assert it directly. But I agree that mock_client.called is excessive check. We can see it from the next assert. I suggest to place a comment here and make assert for deletion more precise.","commit_id":"e8c8738d26320cd155c1b40b1ee05e542679062b"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"e0beef93beed2e5703c875e63bb6e70e19f78dd3","unresolved":false,"context_lines":[{"line_number":8,"context_line":"#    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":9,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":"import optparse"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"import mock"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FXQs%3D","line":11,"updated":"2013-11-08 06:11:07.000000000","message":"I believe you need a line after the Licensing headers.","commit_id":"2b218d6ae4f59c08e58d8efdc4d8185f1baee26b"},{"author":{"_account_id":8689,"name":"Vitaliy Kolosov","email":"vkolosov@yahoo-inc.com","username":"VKolosov"},"change_message_id":"511564ad71577ee18ae3d22f0fe19e952e1f3fd6","unresolved":false,"context_lines":[{"line_number":8,"context_line":"#    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":9,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":"import optparse"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"import mock"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FWnY%3D","line":11,"in_reply_to":"AAAATn%2F%2FXQs%3D","updated":"2013-11-08 14:50:15.000000000","message":"Done","commit_id":"2b218d6ae4f59c08e58d8efdc4d8185f1baee26b"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"e0beef93beed2e5703c875e63bb6e70e19f78dd3","unresolved":false,"context_lines":[{"line_number":14,"context_line":"import mock"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from glance.cmd import cache_manage"},{"line_number":17,"context_line":"import glance.cmd.api"},{"line_number":18,"context_line":"import glance.common.config"},{"line_number":19,"context_line":"from glance.common import exception"},{"line_number":20,"context_line":"import glance.common.wsgi"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FXQo%3D","line":17,"updated":"2013-11-08 06:11:07.000000000","message":"import ordering does not comply HACKING guidelines. Please refer the HACKING.rst file in the top level glance dir.","commit_id":"2b218d6ae4f59c08e58d8efdc4d8185f1baee26b"},{"author":{"_account_id":8689,"name":"Vitaliy Kolosov","email":"vkolosov@yahoo-inc.com","username":"VKolosov"},"change_message_id":"511564ad71577ee18ae3d22f0fe19e952e1f3fd6","unresolved":false,"context_lines":[{"line_number":14,"context_line":"import mock"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from glance.cmd import cache_manage"},{"line_number":17,"context_line":"import glance.cmd.api"},{"line_number":18,"context_line":"import glance.common.config"},{"line_number":19,"context_line":"from glance.common import exception"},{"line_number":20,"context_line":"import glance.common.wsgi"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FWnU%3D","line":17,"in_reply_to":"AAAATn%2F%2FXQo%3D","updated":"2013-11-08 14:50:15.000000000","message":"Done","commit_id":"2b218d6ae4f59c08e58d8efdc4d8185f1baee26b"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"e0beef93beed2e5703c875e63bb6e70e19f78dd3","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class TestGlanceCmdManage(test_utils.BaseTestCase):"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    \"\"\" Verify that list_cached() method correctly processes images with all"},{"line_number":27,"context_line":"    filled data and images with not filled \u0027last_accessed\u0027 field. \"\"\""},{"line_number":28,"context_line":"    @mock.patch.object(glance.image_cache.client.CacheClient,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FXP8%3D","line":25,"updated":"2013-11-08 06:11:07.000000000","message":"Feel like you can add a setUp to initialize some of the vars like manager. Not necessary though.","commit_id":"2b218d6ae4f59c08e58d8efdc4d8185f1baee26b"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"d760f2fa67b4e65cd52b1830391e54c0b9abdd5a","unresolved":false,"context_lines":[{"line_number":24,"context_line":"class TestGlanceCmdManage(test_utils.BaseTestCase):"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    \"\"\" Verify that list_cached() method correctly processes images with all"},{"line_number":27,"context_line":"    filled data and images with not filled \u0027last_accessed\u0027 field. \"\"\""},{"line_number":28,"context_line":"    @mock.patch.object(glance.image_cache.client.CacheClient,"},{"line_number":29,"context_line":"                       \u0027get_cached_images\u0027)"},{"line_number":30,"context_line":"    @mock.patch.object(glance.common.utils.PrettyTable, \u0027make_row\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FeZU%3D","line":27,"updated":"2013-11-05 08:37:29.000000000","message":"I\u0027m wondering what\u0027s the reason of placing docstrings here instead of function body?","commit_id":"2b218d6ae4f59c08e58d8efdc4d8185f1baee26b"},{"author":{"_account_id":8689,"name":"Vitaliy Kolosov","email":"vkolosov@yahoo-inc.com","username":"VKolosov"},"change_message_id":"511564ad71577ee18ae3d22f0fe19e952e1f3fd6","unresolved":false,"context_lines":[{"line_number":24,"context_line":"class TestGlanceCmdManage(test_utils.BaseTestCase):"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    \"\"\" Verify that list_cached() method correctly processes images with all"},{"line_number":27,"context_line":"    filled data and images with not filled \u0027last_accessed\u0027 field. \"\"\""},{"line_number":28,"context_line":"    @mock.patch.object(glance.image_cache.client.CacheClient,"},{"line_number":29,"context_line":"                       \u0027get_cached_images\u0027)"},{"line_number":30,"context_line":"    @mock.patch.object(glance.common.utils.PrettyTable, \u0027make_row\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FWlw%3D","line":27,"in_reply_to":"AAAATn%2F%2FXxM%3D","updated":"2013-11-08 14:50:15.000000000","message":"Done","commit_id":"2b218d6ae4f59c08e58d8efdc4d8185f1baee26b"},{"author":{"_account_id":8759,"name":"Arnaud Legendre","email":"arnaudleg@gmail.com","username":"arnaud"},"change_message_id":"c4db80e65e5318f246b908cfd4655dbd7ce41fe2","unresolved":false,"context_lines":[{"line_number":24,"context_line":"class TestGlanceCmdManage(test_utils.BaseTestCase):"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    \"\"\" Verify that list_cached() method correctly processes images with all"},{"line_number":27,"context_line":"    filled data and images with not filled \u0027last_accessed\u0027 field. \"\"\""},{"line_number":28,"context_line":"    @mock.patch.object(glance.image_cache.client.CacheClient,"},{"line_number":29,"context_line":"                       \u0027get_cached_images\u0027)"},{"line_number":30,"context_line":"    @mock.patch.object(glance.common.utils.PrettyTable, \u0027make_row\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FXxM%3D","line":27,"in_reply_to":"AAAATn%2F%2FeZU%3D","updated":"2013-11-08 02:25:45.000000000","message":"+1","commit_id":"2b218d6ae4f59c08e58d8efdc4d8185f1baee26b"},{"author":{"_account_id":8689,"name":"Vitaliy Kolosov","email":"vkolosov@yahoo-inc.com","username":"VKolosov"},"change_message_id":"511564ad71577ee18ae3d22f0fe19e952e1f3fd6","unresolved":false,"context_lines":[{"line_number":24,"context_line":"class TestGlanceCmdManage(test_utils.BaseTestCase):"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    \"\"\" Verify that list_cached() method correctly processes images with all"},{"line_number":27,"context_line":"    filled data and images with not filled \u0027last_accessed\u0027 field. \"\"\""},{"line_number":28,"context_line":"    @mock.patch.object(glance.image_cache.client.CacheClient,"},{"line_number":29,"context_line":"                       \u0027get_cached_images\u0027)"},{"line_number":30,"context_line":"    @mock.patch.object(glance.common.utils.PrettyTable, \u0027make_row\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FWl0%3D","line":27,"in_reply_to":"AAAATn%2F%2FeZU%3D","updated":"2013-11-08 14:50:15.000000000","message":"Done","commit_id":"2b218d6ae4f59c08e58d8efdc4d8185f1baee26b"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"d760f2fa67b4e65cd52b1830391e54c0b9abdd5a","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    def test_list_cached_images_empty(self, mock_images):"},{"line_number":54,"context_line":"        mock_images.return_value \u003d []"},{"line_number":55,"context_line":"        cache_manage.list_cached(mock.Mock(), \u0027\u0027)"},{"line_number":56,"context_line":"        self.assertTrue(True)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    \"\"\" Verify that list_queued() method correctly processes images. \"\"\""},{"line_number":59,"context_line":"    @mock.patch.object(glance.image_cache.client.CacheClient,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FeWE%3D","line":56,"updated":"2013-11-05 08:37:29.000000000","message":"Should work without that assert.","commit_id":"2b218d6ae4f59c08e58d8efdc4d8185f1baee26b"},{"author":{"_account_id":8689,"name":"Vitaliy Kolosov","email":"vkolosov@yahoo-inc.com","username":"VKolosov"},"change_message_id":"511564ad71577ee18ae3d22f0fe19e952e1f3fd6","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    def test_list_cached_images_empty(self, mock_images):"},{"line_number":54,"context_line":"        mock_images.return_value \u003d []"},{"line_number":55,"context_line":"        cache_manage.list_cached(mock.Mock(), \u0027\u0027)"},{"line_number":56,"context_line":"        self.assertTrue(True)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    \"\"\" Verify that list_queued() method correctly processes images. \"\"\""},{"line_number":59,"context_line":"    @mock.patch.object(glance.image_cache.client.CacheClient,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FWlc%3D","line":56,"in_reply_to":"AAAATn%2F%2FeWE%3D","updated":"2013-11-08 14:50:15.000000000","message":"This test is intended to check error absence during the method execution. Acceptable result is \"no error\". To mark it I decided to place positive assert here because no asserts in a test at all looks queer.","commit_id":"2b218d6ae4f59c08e58d8efdc4d8185f1baee26b"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"e0beef93beed2e5703c875e63bb6e70e19f78dd3","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        mock_confirm.return_value \u003d False"},{"line_number":94,"context_line":"        mock_options \u003d mock.Mock()"},{"line_number":95,"context_line":"        mock_options.force \u003d False"},{"line_number":96,"context_line":"        self.assertEquals(cache_manage.queue_image(mock_options, [\u0027img_id\u0027]),"},{"line_number":97,"context_line":"                          cache_manage.SUCCESS)"},{"line_number":98,"context_line":"        self.assertFalse(mock_client.called)"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FXWo%3D","line":96,"updated":"2013-11-08 06:11:07.000000000","message":"assertEquals is deprecated","commit_id":"2b218d6ae4f59c08e58d8efdc4d8185f1baee26b"},{"author":{"_account_id":8689,"name":"Vitaliy Kolosov","email":"vkolosov@yahoo-inc.com","username":"VKolosov"},"change_message_id":"511564ad71577ee18ae3d22f0fe19e952e1f3fd6","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        mock_confirm.return_value \u003d False"},{"line_number":94,"context_line":"        mock_options \u003d mock.Mock()"},{"line_number":95,"context_line":"        mock_options.force \u003d False"},{"line_number":96,"context_line":"        self.assertEquals(cache_manage.queue_image(mock_options, [\u0027img_id\u0027]),"},{"line_number":97,"context_line":"                          cache_manage.SUCCESS)"},{"line_number":98,"context_line":"        self.assertFalse(mock_client.called)"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FWlA%3D","line":96,"in_reply_to":"AAAATn%2F%2FXWo%3D","updated":"2013-11-08 14:50:15.000000000","message":"Done","commit_id":"2b218d6ae4f59c08e58d8efdc4d8185f1baee26b"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"d760f2fa67b4e65cd52b1830391e54c0b9abdd5a","unresolved":false,"context_lines":[{"line_number":112,"context_line":"                          cache_manage.SUCCESS)"},{"line_number":113,"context_line":"        self.assertTrue(mock_client.called)"},{"line_number":114,"context_line":"        self.assertTrue(\u0027mock_client().queue_image_for_caching\u0027 in"},{"line_number":115,"context_line":"                        manager.mock_calls[1])"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def test_delete_cached_image_without_index(self):"},{"line_number":118,"context_line":"        self.assertEquals(cache_manage.delete_cached_image(mock.Mock(), []),"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FeTk%3D","line":115,"updated":"2013-11-05 08:37:29.000000000","message":"I think doing something assertTrue(mock.call.mock_client().queue_image_for_caching(\u0027img_id\u0027) in manager.mock_calls) would be more readable.","commit_id":"2b218d6ae4f59c08e58d8efdc4d8185f1baee26b"},{"author":{"_account_id":8689,"name":"Vitaliy Kolosov","email":"vkolosov@yahoo-inc.com","username":"VKolosov"},"change_message_id":"511564ad71577ee18ae3d22f0fe19e952e1f3fd6","unresolved":false,"context_lines":[{"line_number":112,"context_line":"                          cache_manage.SUCCESS)"},{"line_number":113,"context_line":"        self.assertTrue(mock_client.called)"},{"line_number":114,"context_line":"        self.assertTrue(\u0027mock_client().queue_image_for_caching\u0027 in"},{"line_number":115,"context_line":"                        manager.mock_calls[1])"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def test_delete_cached_image_without_index(self):"},{"line_number":118,"context_line":"        self.assertEquals(cache_manage.delete_cached_image(mock.Mock(), []),"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FWi4%3D","line":115,"in_reply_to":"AAAATn%2F%2FeTk%3D","updated":"2013-11-08 14:50:15.000000000","message":"Thank you for advice. Done.","commit_id":"2b218d6ae4f59c08e58d8efdc4d8185f1baee26b"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"d760f2fa67b4e65cd52b1830391e54c0b9abdd5a","unresolved":false,"context_lines":[{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        # First mocked call is client.init so let\u0027s assert the second."},{"line_number":152,"context_line":"        self.assertEquals(\"call.mock_client().delete_cached_image(\u0027img_id\u0027)\","},{"line_number":153,"context_line":"                          str(manager.mock_calls[1]))"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    \"\"\" options.forced set to False and delete confirmation set to False. \"\"\""},{"line_number":156,"context_line":"    @mock.patch.object(glance.cmd.cache_manage, \u0027user_confirm\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FeTQ%3D","line":153,"updated":"2013-11-05 08:37:29.000000000","message":"Ditto.","commit_id":"2b218d6ae4f59c08e58d8efdc4d8185f1baee26b"},{"author":{"_account_id":8689,"name":"Vitaliy Kolosov","email":"vkolosov@yahoo-inc.com","username":"VKolosov"},"change_message_id":"511564ad71577ee18ae3d22f0fe19e952e1f3fd6","unresolved":false,"context_lines":[{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        # First mocked call is client.init so let\u0027s assert the second."},{"line_number":152,"context_line":"        self.assertEquals(\"call.mock_client().delete_cached_image(\u0027img_id\u0027)\","},{"line_number":153,"context_line":"                          str(manager.mock_calls[1]))"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    \"\"\" options.forced set to False and delete confirmation set to False. \"\"\""},{"line_number":156,"context_line":"    @mock.patch.object(glance.cmd.cache_manage, \u0027user_confirm\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FWi0%3D","line":153,"in_reply_to":"AAAATn%2F%2FeTQ%3D","updated":"2013-11-08 14:50:15.000000000","message":"Done","commit_id":"2b218d6ae4f59c08e58d8efdc4d8185f1baee26b"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"e0beef93beed2e5703c875e63bb6e70e19f78dd3","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        self.assertEquals("},{"line_number":165,"context_line":"            cache_manage.delete_all_cached_images(mock_options, None),"},{"line_number":166,"context_line":"            cache_manage.SUCCESS)"},{"line_number":167,"context_line":"        self.assertFalse(mock_client.called)"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    \"\"\" options.forced set to False and delete confirmation set to True. \"\"\""},{"line_number":170,"context_line":"    @mock.patch.object(glance.cmd.cache_manage, \u0027user_confirm\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FXRM%3D","line":167,"updated":"2013-11-08 06:11:07.000000000","message":"why not use \"assert_called_with()\"  in some of the places here?","commit_id":"2b218d6ae4f59c08e58d8efdc4d8185f1baee26b"},{"author":{"_account_id":8689,"name":"Vitaliy Kolosov","email":"vkolosov@yahoo-inc.com","username":"VKolosov"},"change_message_id":"511564ad71577ee18ae3d22f0fe19e952e1f3fd6","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        self.assertEquals("},{"line_number":165,"context_line":"            cache_manage.delete_all_cached_images(mock_options, None),"},{"line_number":166,"context_line":"            cache_manage.SUCCESS)"},{"line_number":167,"context_line":"        self.assertFalse(mock_client.called)"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    \"\"\" options.forced set to False and delete confirmation set to True. \"\"\""},{"line_number":170,"context_line":"    @mock.patch.object(glance.cmd.cache_manage, \u0027user_confirm\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FWh0%3D","line":167,"in_reply_to":"AAAATn%2F%2FXRM%3D","updated":"2013-11-08 14:50:15.000000000","message":"I\u0027m not sure what exactly places do you mean. Somewhere I mock a parent class (CacheClient) and then assert some of his method calls. So as I understand, I can\u0027t directly say assert_called_with() for these nested ones and assert them among the manager.mock_calls.\n\nNevertheless I\u0027ve changed some assert according to Roman\u0027s advice and I hope they\u0027re more readable now.","commit_id":"2b218d6ae4f59c08e58d8efdc4d8185f1baee26b"},{"author":{"_account_id":8759,"name":"Arnaud Legendre","email":"arnaudleg@gmail.com","username":"arnaud"},"change_message_id":"c4db80e65e5318f246b908cfd4655dbd7ce41fe2","unresolved":false,"context_lines":[{"line_number":332,"context_line":"                                                              [\u0027-p\u0027, \u00271212\u0027,"},{"line_number":333,"context_line":"                                                               \u0027list-cached\u0027])"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        self.assertEquals(True, command)"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"    def test_lookup_command_unsupported_command(self):"},{"line_number":338,"context_line":"        self.assertRaises(SystemExit, cache_manage.lookup_command, mock.Mock(),"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FXxQ%3D","line":335,"updated":"2013-11-08 02:25:45.000000000","message":"self.assertTrue","commit_id":"2b218d6ae4f59c08e58d8efdc4d8185f1baee26b"},{"author":{"_account_id":8689,"name":"Vitaliy Kolosov","email":"vkolosov@yahoo-inc.com","username":"VKolosov"},"change_message_id":"511564ad71577ee18ae3d22f0fe19e952e1f3fd6","unresolved":false,"context_lines":[{"line_number":332,"context_line":"                                                              [\u0027-p\u0027, \u00271212\u0027,"},{"line_number":333,"context_line":"                                                               \u0027list-cached\u0027])"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        self.assertEquals(True, command)"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"    def test_lookup_command_unsupported_command(self):"},{"line_number":338,"context_line":"        self.assertRaises(SystemExit, cache_manage.lookup_command, mock.Mock(),"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FWhg%3D","line":335,"in_reply_to":"AAAATn%2F%2FXxQ%3D","updated":"2013-11-08 14:50:15.000000000","message":"Done","commit_id":"2b218d6ae4f59c08e58d8efdc4d8185f1baee26b"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"143d8fc602e05879ecf1b5bee7ad1b5be87d50c5","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from glance.cmd import cache_manage"},{"line_number":19,"context_line":"import glance.common.config"},{"line_number":20,"context_line":"import glance.common.wsgi"},{"line_number":21,"context_line":"from glance.common import exception"},{"line_number":22,"context_line":"from glance.tests import utils as test_utils"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FVyw%3D","line":21,"updated":"2013-11-09 01:22:39.000000000","message":"import order error:\nline current 21 should be before current line 20","commit_id":"ef8aa305bf85ce67a60e9bc96b014933919c6430"},{"author":{"_account_id":8689,"name":"Vitaliy Kolosov","email":"vkolosov@yahoo-inc.com","username":"VKolosov"},"change_message_id":"74a3fd3aeb940aa8868f09cc800c5e537433052b","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from glance.cmd import cache_manage"},{"line_number":19,"context_line":"import glance.common.config"},{"line_number":20,"context_line":"import glance.common.wsgi"},{"line_number":21,"context_line":"from glance.common import exception"},{"line_number":22,"context_line":"from glance.tests import utils as test_utils"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FTik%3D","line":21,"in_reply_to":"AAAATn%2F%2FVyw%3D","updated":"2013-11-12 08:36:40.000000000","message":"Thank you. I\u0027ll change this.\nIt seems, there is incorrect example in HACKING.rst file:\n  import glance.api.middleware\n  from glance.api import images","commit_id":"ef8aa305bf85ce67a60e9bc96b014933919c6430"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"143d8fc602e05879ecf1b5bee7ad1b5be87d50c5","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        mock_images.return_value \u003d []"},{"line_number":62,"context_line":"        cache_manage.list_cached(mock.Mock(), \u0027\u0027)"},{"line_number":63,"context_line":"        self.assertTrue(True)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    @mock.patch.object(glance.image_cache.client.CacheClient,"},{"line_number":66,"context_line":"                       \u0027get_queued_images\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FVyY%3D","line":63,"updated":"2013-11-09 01:22:39.000000000","message":"hmm, may be we should assert for return value of 0 here? Seems like for no images it returns SUCCESS (mapped to 0)","commit_id":"ef8aa305bf85ce67a60e9bc96b014933919c6430"},{"author":{"_account_id":8689,"name":"Vitaliy Kolosov","email":"vkolosov@yahoo-inc.com","username":"VKolosov"},"change_message_id":"74a3fd3aeb940aa8868f09cc800c5e537433052b","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        mock_images.return_value \u003d []"},{"line_number":62,"context_line":"        cache_manage.list_cached(mock.Mock(), \u0027\u0027)"},{"line_number":63,"context_line":"        self.assertTrue(True)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    @mock.patch.object(glance.image_cache.client.CacheClient,"},{"line_number":66,"context_line":"                       \u0027get_queued_images\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FTiY%3D","line":63,"in_reply_to":"AAAATn%2F%2FVyY%3D","updated":"2013-11-12 08:36:40.000000000","message":"Done","commit_id":"ef8aa305bf85ce67a60e9bc96b014933919c6430"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"143d8fc602e05879ecf1b5bee7ad1b5be87d50c5","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        mock_images.return_value \u003d []"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        cache_manage.list_queued(mock.Mock(), \u0027\u0027)"},{"line_number":94,"context_line":"        self.assertTrue(True)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def test_queue_image_without_index(self):"},{"line_number":97,"context_line":"        self.assertEqual(cache_manage.queue_image(mock.Mock(), []),"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FVyI%3D","line":94,"updated":"2013-11-09 01:22:39.000000000","message":"same as line 63","commit_id":"ef8aa305bf85ce67a60e9bc96b014933919c6430"},{"author":{"_account_id":8689,"name":"Vitaliy Kolosov","email":"vkolosov@yahoo-inc.com","username":"VKolosov"},"change_message_id":"74a3fd3aeb940aa8868f09cc800c5e537433052b","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        mock_images.return_value \u003d []"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        cache_manage.list_queued(mock.Mock(), \u0027\u0027)"},{"line_number":94,"context_line":"        self.assertTrue(True)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def test_queue_image_without_index(self):"},{"line_number":97,"context_line":"        self.assertEqual(cache_manage.queue_image(mock.Mock(), []),"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FThk%3D","line":94,"in_reply_to":"AAAATn%2F%2FVyI%3D","updated":"2013-11-12 08:36:40.000000000","message":"Done","commit_id":"ef8aa305bf85ce67a60e9bc96b014933919c6430"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"143d8fc602e05879ecf1b5bee7ad1b5be87d50c5","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def test_queue_image_without_index(self):"},{"line_number":97,"context_line":"        self.assertEqual(cache_manage.queue_image(mock.Mock(), []),"},{"line_number":98,"context_line":"                         cache_manage.FAILURE)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    @mock.patch.object(glance.cmd.cache_manage, \u0027user_confirm\u0027)"},{"line_number":101,"context_line":"    @mock.patch.object(glance.cmd.cache_manage, \u0027get_client\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FVx8%3D","line":98,"updated":"2013-11-09 01:22:39.000000000","message":"Ah, cool. So, may be the above 2 tests can look like this one.","commit_id":"ef8aa305bf85ce67a60e9bc96b014933919c6430"},{"author":{"_account_id":8689,"name":"Vitaliy Kolosov","email":"vkolosov@yahoo-inc.com","username":"VKolosov"},"change_message_id":"74a3fd3aeb940aa8868f09cc800c5e537433052b","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def test_queue_image_without_index(self):"},{"line_number":97,"context_line":"        self.assertEqual(cache_manage.queue_image(mock.Mock(), []),"},{"line_number":98,"context_line":"                         cache_manage.FAILURE)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    @mock.patch.object(glance.cmd.cache_manage, \u0027user_confirm\u0027)"},{"line_number":101,"context_line":"    @mock.patch.object(glance.cmd.cache_manage, \u0027get_client\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FThg%3D","line":98,"in_reply_to":"AAAATn%2F%2FVx8%3D","updated":"2013-11-12 08:36:40.000000000","message":"Done","commit_id":"ef8aa305bf85ce67a60e9bc96b014933919c6430"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"143d8fc602e05879ecf1b5bee7ad1b5be87d50c5","unresolved":false,"context_lines":[{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    @mock.patch.object(glance.cmd.cache_manage, \u0027get_client\u0027)"},{"line_number":284,"context_line":"    def test_catch_error_not_found(self, mock_function):"},{"line_number":285,"context_line":"        mock_function.side_effect \u003d exception.NotFound()"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"        self.assertEqual(cache_manage.list_cached(mock.Mock(), None),"},{"line_number":288,"context_line":"                         cache_manage.FAILURE)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FVx0%3D","line":285,"updated":"2013-11-09 01:22:39.000000000","message":"I think in all the cases of exceptions you need to add assertRaises","commit_id":"ef8aa305bf85ce67a60e9bc96b014933919c6430"},{"author":{"_account_id":8689,"name":"Vitaliy Kolosov","email":"vkolosov@yahoo-inc.com","username":"VKolosov"},"change_message_id":"74a3fd3aeb940aa8868f09cc800c5e537433052b","unresolved":false,"context_lines":[{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    @mock.patch.object(glance.cmd.cache_manage, \u0027get_client\u0027)"},{"line_number":284,"context_line":"    def test_catch_error_not_found(self, mock_function):"},{"line_number":285,"context_line":"        mock_function.side_effect \u003d exception.NotFound()"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"        self.assertEqual(cache_manage.list_cached(mock.Mock(), None),"},{"line_number":288,"context_line":"                         cache_manage.FAILURE)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FTg4%3D","line":285,"in_reply_to":"AAAATn%2F%2FVx0%3D","updated":"2013-11-12 08:36:40.000000000","message":"list_cached() method has @catch_error decorator so this test is for this decorator. Any exception not in DEBUG mode result FAILURE response instead or raise error.","commit_id":"ef8aa305bf85ce67a60e9bc96b014933919c6430"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"7803dd3d27ca699ad9b6d2dd24a0482f65b67fd3","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        self.assertEqual(len(mock_images.return_value) * 2,"},{"line_number":48,"context_line":"                         len(manager.mock_calls))"},{"line_number":49,"context_line":"        self.assertTrue("},{"line_number":50,"context_line":"            \u0027mock_row_create\u0027 in value for value in manager.mock_calls)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    @mock.patch.object(glance.image_cache.client.CacheClient,"},{"line_number":53,"context_line":"                       \u0027get_cached_images\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F%2FPvU%3D","line":50,"updated":"2013-11-12 10:24:52.000000000","message":"Have you considered a slightly simplier option, replacing these two asserts (assertEqual and assertTrue) with a single one like:\n\nself.assertEqual(len(mock_images.return_value), mock_row_create.call_count) ?","commit_id":"a15305b41774d6e4735785491c672ba9b87ae707"},{"author":{"_account_id":8689,"name":"Vitaliy Kolosov","email":"vkolosov@yahoo-inc.com","username":"VKolosov"},"change_message_id":"65c8fbfb57be494b01f787275010490b234156a0","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        self.assertEqual(len(mock_images.return_value) * 2,"},{"line_number":48,"context_line":"                         len(manager.mock_calls))"},{"line_number":49,"context_line":"        self.assertTrue("},{"line_number":50,"context_line":"            \u0027mock_row_create\u0027 in value for value in manager.mock_calls)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    @mock.patch.object(glance.image_cache.client.CacheClient,"},{"line_number":53,"context_line":"                       \u0027get_cached_images\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAATn%2F%2FPmc%3D","line":50,"in_reply_to":"AAAATn%2F%2FPvU%3D","updated":"2013-11-12 11:08:52.000000000","message":"Thank you for advise. It\u0027s much clearer than my approach. Updated.","commit_id":"a15305b41774d6e4735785491c672ba9b87ae707"},{"author":{"_account_id":5347,"name":"Eddie Sheffield","email":"eddie.sheffield@rackspace.com","username":"eddie-sheffield"},"change_message_id":"f0badf89f6a364eac89dcd38088e0a3481cfe498","unresolved":false,"context_lines":[{"line_number":40,"context_line":"             \u0027last_modified\u0027: float(1378985797.124511),"},{"line_number":41,"context_line":"             \u0027image_id\u0027: \u00272\u0027, \u0027size\u0027: \u0027255\u0027, \u0027hits\u0027: \u00272\u0027}]"},{"line_number":42,"context_line":"        manager \u003d mock.MagicMock()"},{"line_number":43,"context_line":"        manager.attach_mock(mock_row_create, \u0027mock_row_create\u0027)"},{"line_number":44,"context_line":"        cache_manage.list_cached(mock.Mock(), \u0027\u0027)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        self.assertEqual(len(mock_images.return_value),"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAATn%2F%2FJh8%3D","line":43,"updated":"2013-11-13 19:28:53.000000000","message":"Not sure I understand how this manager is getting used. Seems like once it\u0027s set up, it\u0027s never actually used for anything.","commit_id":"e6fb683d083042862234e12c9e449269a6576fd9"},{"author":{"_account_id":8689,"name":"Vitaliy Kolosov","email":"vkolosov@yahoo-inc.com","username":"VKolosov"},"change_message_id":"ca9fc562c8995309cb88fb79d8a4fec9c152d37c","unresolved":false,"context_lines":[{"line_number":40,"context_line":"             \u0027last_modified\u0027: float(1378985797.124511),"},{"line_number":41,"context_line":"             \u0027image_id\u0027: \u00272\u0027, \u0027size\u0027: \u0027255\u0027, \u0027hits\u0027: \u00272\u0027}]"},{"line_number":42,"context_line":"        manager \u003d mock.MagicMock()"},{"line_number":43,"context_line":"        manager.attach_mock(mock_row_create, \u0027mock_row_create\u0027)"},{"line_number":44,"context_line":"        cache_manage.list_cached(mock.Mock(), \u0027\u0027)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        self.assertEqual(len(mock_images.return_value),"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAATn%2F%2FG2A%3D","line":43,"in_reply_to":"AAAATn%2F%2FJh8%3D","updated":"2013-11-14 11:00:38.000000000","message":"It was used in previous version of assert for this test. Then when I changed the assert I forgot to remove the manager.","commit_id":"e6fb683d083042862234e12c9e449269a6576fd9"},{"author":{"_account_id":5347,"name":"Eddie Sheffield","email":"eddie.sheffield@rackspace.com","username":"eddie-sheffield"},"change_message_id":"f0badf89f6a364eac89dcd38088e0a3481cfe498","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        mock_images.return_value \u003d ["},{"line_number":68,"context_line":"            {\u0027image_id\u0027: \u00271\u0027}, {\u0027image_id\u0027: \u00272\u0027}]"},{"line_number":69,"context_line":"        manager \u003d mock.MagicMock()"},{"line_number":70,"context_line":"        manager.attach_mock(mock_row_create, \u0027mock_row_create\u0027)"},{"line_number":71,"context_line":"        cache_manage.list_queued(mock.Mock(), \u0027\u0027)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        self.assertEqual(len(mock_images.return_value),"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAATn%2F%2FJh4%3D","line":70,"updated":"2013-11-13 19:28:53.000000000","message":"Same comment as above.","commit_id":"e6fb683d083042862234e12c9e449269a6576fd9"},{"author":{"_account_id":8689,"name":"Vitaliy Kolosov","email":"vkolosov@yahoo-inc.com","username":"VKolosov"},"change_message_id":"ca9fc562c8995309cb88fb79d8a4fec9c152d37c","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        mock_images.return_value \u003d ["},{"line_number":68,"context_line":"            {\u0027image_id\u0027: \u00271\u0027}, {\u0027image_id\u0027: \u00272\u0027}]"},{"line_number":69,"context_line":"        manager \u003d mock.MagicMock()"},{"line_number":70,"context_line":"        manager.attach_mock(mock_row_create, \u0027mock_row_create\u0027)"},{"line_number":71,"context_line":"        cache_manage.list_queued(mock.Mock(), \u0027\u0027)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        self.assertEqual(len(mock_images.return_value),"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAATn%2F%2FG14%3D","line":70,"in_reply_to":"AAAATn%2F%2FJh4%3D","updated":"2013-11-14 11:00:38.000000000","message":"Done","commit_id":"e6fb683d083042862234e12c9e449269a6576fd9"}]}
