)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"361fc8868659c76a9ea51dc8e752c9ec84a96d54","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"This change fixes the call and makes the test a bit less"},{"line_number":19,"context_line":"brittle, but would be cleaner if it could use autospec"},{"line_number":20,"context_line":"although figuring out how to make that work alludes me."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Change-Id: I12088f57f6228460b4810d39e9fca93bd589d70b"},{"line_number":23,"context_line":"Closes-Bug: #1694535"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"df140735_3cd3d462","line":20,"range":{"start_line":20,"start_character":44,"end_line":20,"end_character":51},"updated":"2017-06-01 05:01:44.000000000","message":"piconit: elude\n\nYeah, I\u0027m an ass for even pointing that out.","commit_id":"22279bb2dbc415fcd4d7a4b195ae698eb4e923c8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7c0af180adb003886a2e22b216b43213db0a4f56","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"This change fixes the call and makes the test a bit less"},{"line_number":19,"context_line":"brittle, but would be cleaner if it could use autospec"},{"line_number":20,"context_line":"although figuring out how to make that work alludes me."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Change-Id: I12088f57f6228460b4810d39e9fca93bd589d70b"},{"line_number":23,"context_line":"Closes-Bug: #1694535"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"df140735_3a2aab8f","line":20,"range":{"start_line":20,"start_character":44,"end_line":20,"end_character":51},"in_reply_to":"df140735_3cd3d462","updated":"2017-06-01 13:11:40.000000000","message":"Heh I had a feeling I had this one wrong since I knew about the other, but it was 11pm and I wanted to go to bed so was too lazy to double check.","commit_id":"22279bb2dbc415fcd4d7a4b195ae698eb4e923c8"}],"nova/tests/unit/compute/test_compute_mgr.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"361fc8868659c76a9ea51dc8e752c9ec84a96d54","unresolved":false,"context_lines":[{"line_number":2429,"context_line":"        ) as (mock_volume_api, mock_virt_driver, mock_driver_detach):"},{"line_number":2430,"context_line":"            connector \u003d mock.Mock()"},{"line_number":2431,"context_line":""},{"line_number":2432,"context_line":"            def fake_driver_detach(context, instance, volume_api, virt_driver):"},{"line_number":2433,"context_line":"                # This is just here to validate the function signature."},{"line_number":2434,"context_line":"                pass"},{"line_number":2435,"context_line":""},{"line_number":2436,"context_line":"            # There should be an easier way to do this with autospec..."},{"line_number":2437,"context_line":"            mock_driver_detach.side_effect \u003d fake_driver_detach"}],"source_content_type":"text/x-python","patch_set":1,"id":"df140735_9c466021","line":2434,"range":{"start_line":2432,"start_character":0,"end_line":2434,"end_character":20},"updated":"2017-06-01 05:01:44.000000000","message":"Meh. Logically this just duplicates the problem from assert_called_once_with up here: they now both have to be manually synchronised. In the future we\u0027ll just fail to update this too.\n\nI don\u0027t have a dev environment here unfortunately or I\u0027d hack on it. What issue did you hit with autospec?","commit_id":"22279bb2dbc415fcd4d7a4b195ae698eb4e923c8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7c0af180adb003886a2e22b216b43213db0a4f56","unresolved":false,"context_lines":[{"line_number":2429,"context_line":"        ) as (mock_volume_api, mock_virt_driver, mock_driver_detach):"},{"line_number":2430,"context_line":"            connector \u003d mock.Mock()"},{"line_number":2431,"context_line":""},{"line_number":2432,"context_line":"            def fake_driver_detach(context, instance, volume_api, virt_driver):"},{"line_number":2433,"context_line":"                # This is just here to validate the function signature."},{"line_number":2434,"context_line":"                pass"},{"line_number":2435,"context_line":""},{"line_number":2436,"context_line":"            # There should be an easier way to do this with autospec..."},{"line_number":2437,"context_line":"            mock_driver_detach.side_effect \u003d fake_driver_detach"}],"source_content_type":"text/x-python","patch_set":1,"id":"df140735_453100ec","line":2434,"range":{"start_line":2432,"start_character":0,"end_line":2434,"end_character":20},"in_reply_to":"df140735_9c466021","updated":"2017-06-01 13:11:40.000000000","message":"Yeah but the difference is if we\u0027re passing too many things in the compute manager this will catch it, whereas the mock wouldn\u0027t.\n\nI can\u0027t really explain all of the different ways I tried to autospec this but things wouldn\u0027t work. The most annoying was doing something like:\n\n@mock.patch(\u0027nova.virt.block_device.DriverVolumeBlockDevice\u0027, autospec\u003dTrue) as driver_vol_bdm:\n  ...\n  driver_vol_bdm.return_value.driver_detach.assert_called_once_with(...)\n\nAnd it would catch the number of args issue but it would fail the assertion saying driver_detach wasn\u0027t called, maybe because I didn\u0027t mock driver_detach directly - but spec\u0027ing that led to some weird TypeErrors.","commit_id":"22279bb2dbc415fcd4d7a4b195ae698eb4e923c8"}]}
