)]}'
{"nova/tests/image/test_glance.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e5ff94a8546f12f0f88ba0c2351d5a41458134b4","unresolved":false,"context_lines":[{"line_number":766,"context_line":"        client.call.assert_called_once_with(ctx, 1, \u0027create\u0027,"},{"line_number":767,"context_line":"                                            image_id\u003dmock.sentinel.image_id,"},{"line_number":768,"context_line":"                                            data\u003dmock.sentinel.data)"},{"line_number":769,"context_line":"        self.assertIn(\u0027data\u0027, translated)"},{"line_number":770,"context_line":""},{"line_number":771,"context_line":"    @mock.patch(\u0027nova.image.glance._reraise_translated_exception\u0027)"},{"line_number":772,"context_line":"    @mock.patch(\u0027nova.image.glance._translate_from_glance\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAW3%2F%2FmTE%3D","line":769,"updated":"2014-04-11 21:26:00.000000000","message":"I don\u0027t get why your dict above will get modified as part of this call, unless it\u0027s just an implementation detail of how we deal with the result of the translate_to_glance result. If that were to change trivially, this test would break, right?","commit_id":"48cce6993aba27449c5b028a14a863193b841e4c"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a85cff697013cae56b40ec362eae86550f2a7f70","unresolved":false,"context_lines":[{"line_number":766,"context_line":"        client.call.assert_called_once_with(ctx, 1, \u0027create\u0027,"},{"line_number":767,"context_line":"                                            image_id\u003dmock.sentinel.image_id,"},{"line_number":768,"context_line":"                                            data\u003dmock.sentinel.data)"},{"line_number":769,"context_line":"        self.assertIn(\u0027data\u0027, translated)"},{"line_number":770,"context_line":""},{"line_number":771,"context_line":"    @mock.patch(\u0027nova.image.glance._reraise_translated_exception\u0027)"},{"line_number":772,"context_line":"    @mock.patch(\u0027nova.image.glance._translate_from_glance\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAW3%2F%2FmMI%3D","line":769,"in_reply_to":"AAAAW3%2F%2FmNg%3D","updated":"2014-04-11 21:50:56.000000000","message":"Done","commit_id":"48cce6993aba27449c5b028a14a863193b841e4c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"51d683b6f64609322aaf9b9d3cad2080dd92d2e5","unresolved":false,"context_lines":[{"line_number":766,"context_line":"        client.call.assert_called_once_with(ctx, 1, \u0027create\u0027,"},{"line_number":767,"context_line":"                                            image_id\u003dmock.sentinel.image_id,"},{"line_number":768,"context_line":"                                            data\u003dmock.sentinel.data)"},{"line_number":769,"context_line":"        self.assertIn(\u0027data\u0027, translated)"},{"line_number":770,"context_line":""},{"line_number":771,"context_line":"    @mock.patch(\u0027nova.image.glance._reraise_translated_exception\u0027)"},{"line_number":772,"context_line":"    @mock.patch(\u0027nova.image.glance._translate_from_glance\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAW3%2F%2FmNg%3D","line":769,"in_reply_to":"AAAAW3%2F%2FmOQ%3D","updated":"2014-04-11 21:41:05.000000000","message":"it took me a while to figure out what was going on there, so I think it\u0027s less distracting without it.","commit_id":"48cce6993aba27449c5b028a14a863193b841e4c"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"069e24173509bcb2c75776ab654ac405141b1b64","unresolved":false,"context_lines":[{"line_number":766,"context_line":"        client.call.assert_called_once_with(ctx, 1, \u0027create\u0027,"},{"line_number":767,"context_line":"                                            image_id\u003dmock.sentinel.image_id,"},{"line_number":768,"context_line":"                                            data\u003dmock.sentinel.data)"},{"line_number":769,"context_line":"        self.assertIn(\u0027data\u0027, translated)"},{"line_number":770,"context_line":""},{"line_number":771,"context_line":"    @mock.patch(\u0027nova.image.glance._reraise_translated_exception\u0027)"},{"line_number":772,"context_line":"    @mock.patch(\u0027nova.image.glance._translate_from_glance\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAW3%2F%2FmOQ%3D","line":769,"in_reply_to":"AAAAW3%2F%2FmTE%3D","updated":"2014-04-11 21:37:23.000000000","message":"I can remove that if you want. You are correct it is an implementation detail of how we deal with the result from translate_to_glance.","commit_id":"48cce6993aba27449c5b028a14a863193b841e4c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e5ff94a8546f12f0f88ba0c2351d5a41458134b4","unresolved":false,"context_lines":[{"line_number":783,"context_line":"        reraise_mock.side_effect \u003d raised"},{"line_number":784,"context_line":"        service \u003d glance.GlanceImageService(client)"},{"line_number":785,"context_line":""},{"line_number":786,"context_line":"        with testtools.ExpectedException(exception.Invalid):"},{"line_number":787,"context_line":"            service.create(ctx, image_mock)"},{"line_number":788,"context_line":"            trans_to_mock.assert_called_once_with(image_mock)"},{"line_number":789,"context_line":"            trans_from_mock.assert_not_called()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAW3%2F%2FmSs%3D","line":786,"updated":"2014-04-11 21:26:00.000000000","message":"I feel like it\u0027s more common for us to use self.assertRaises() especially since it narrows down which call is going  to actually do the raise. Is there some reason you want/need to do it this way?","commit_id":"48cce6993aba27449c5b028a14a863193b841e4c"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a85cff697013cae56b40ec362eae86550f2a7f70","unresolved":false,"context_lines":[{"line_number":783,"context_line":"        reraise_mock.side_effect \u003d raised"},{"line_number":784,"context_line":"        service \u003d glance.GlanceImageService(client)"},{"line_number":785,"context_line":""},{"line_number":786,"context_line":"        with testtools.ExpectedException(exception.Invalid):"},{"line_number":787,"context_line":"            service.create(ctx, image_mock)"},{"line_number":788,"context_line":"            trans_to_mock.assert_called_once_with(image_mock)"},{"line_number":789,"context_line":"            trans_from_mock.assert_not_called()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAW3%2F%2FmIE%3D","line":786,"in_reply_to":"AAAAW3%2F%2FmMs%3D","updated":"2014-04-11 21:50:56.000000000","message":"Done","commit_id":"48cce6993aba27449c5b028a14a863193b841e4c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"51d683b6f64609322aaf9b9d3cad2080dd92d2e5","unresolved":false,"context_lines":[{"line_number":783,"context_line":"        reraise_mock.side_effect \u003d raised"},{"line_number":784,"context_line":"        service \u003d glance.GlanceImageService(client)"},{"line_number":785,"context_line":""},{"line_number":786,"context_line":"        with testtools.ExpectedException(exception.Invalid):"},{"line_number":787,"context_line":"            service.create(ctx, image_mock)"},{"line_number":788,"context_line":"            trans_to_mock.assert_called_once_with(image_mock)"},{"line_number":789,"context_line":"            trans_from_mock.assert_not_called()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAW3%2F%2FmMs%3D","line":786,"in_reply_to":"AAAAW3%2F%2FmOs%3D","updated":"2014-04-11 21:41:05.000000000","message":"You\u0027re not using that extra stuff here though, right?\n\nI dunno, I guess there are 18 examples of this in the code right now (I figured zero) so it\u0027s not totally unused. But, it feels stylistically differnet from what we normally do, especially since there\u0027s no reason for the departure in this case.\n\nI\u0027ll leave it to you, but definitely think you should keep as little inside the context as possible if you keep it :)","commit_id":"48cce6993aba27449c5b028a14a863193b841e4c"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"069e24173509bcb2c75776ab654ac405141b1b64","unresolved":false,"context_lines":[{"line_number":783,"context_line":"        reraise_mock.side_effect \u003d raised"},{"line_number":784,"context_line":"        service \u003d glance.GlanceImageService(client)"},{"line_number":785,"context_line":""},{"line_number":786,"context_line":"        with testtools.ExpectedException(exception.Invalid):"},{"line_number":787,"context_line":"            service.create(ctx, image_mock)"},{"line_number":788,"context_line":"            trans_to_mock.assert_called_once_with(image_mock)"},{"line_number":789,"context_line":"            trans_from_mock.assert_not_called()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAW3%2F%2FmOs%3D","line":786,"in_reply_to":"AAAAW3%2F%2FmSs%3D","updated":"2014-04-11 21:37:23.000000000","message":"I could de-indent lines 788-789, would that work for you?\n\nThe reason I use with testtools.ExpectedException vs. self.assertRaises() is partly stylistic (I prefer to see the method call as it would appear in the code as opposed to as arguments to a different function), and partly because testtools.ExpectedException() has support for additional regex matching on the content of the exception, which I\u0027ve found quite useful in the past.","commit_id":"48cce6993aba27449c5b028a14a863193b841e4c"}]}
