)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"15eb3630d591fd13b93b7e5d4daa047435d21b2d","unresolved":false,"context_lines":[{"line_number":18,"context_line":"this slightly in ways we want to make obvious, we update"},{"line_number":19,"context_line":"ImageBackendFixture to execute the callback function when cache() is"},{"line_number":20,"context_line":"called. We pre-emptively mock all callback methods so they are not"},{"line_number":21,"context_line":"actually called. Test can assert on these mocks to check that the"},{"line_number":22,"context_line":"intended callback was called, and the arguments used."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Implements: bp/libvirt-imagebackend-refactor"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3a71b18c_6a74f534","line":21,"updated":"2016-12-01 22:55:35.000000000","message":"nit:\nTests can assert\n\nor\n\nA test can assert","commit_id":"1fd6f4b963dfd843a8eeb2936594d1f2f383df76"}],"nova/tests/unit/virt/libvirt/fake_imagebackend.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"74b950e0d52b04308b60c9a0bd1034dbfa42cf53","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        self.useFixture(fixtures.MonkeyPatch("},{"line_number":58,"context_line":"            \u0027nova.virt.libvirt.utils.fetch_image\u0027, self.mock_fetch_image))"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        self.mock_fetch_raw_image \u003d \\"},{"line_number":61,"context_line":"            mock.create_autospec(libvirt_utils.fetch_raw_image)"},{"line_number":62,"context_line":"        self.useFixture(fixtures.MonkeyPatch("},{"line_number":63,"context_line":"            \u0027nova.virt.libvirt.utils.fetch_raw_image\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a77a97e_62594d5b","line":60,"updated":"2016-11-22 19:35:31.000000000","message":"femto-nit: prefer to avoid \\ line-continuation markers when you can just use the function\u0027s parens:\n\n self.mock_fetch_raw_image \u003d mock.create_autospec(\n     libvirt_utils.fetch_raw_image)\n\nor better still:\n\n fn_mock \u003d mock.create_autospec(libvirt_utils.fetch_raw_image)\n self.mock_fetch_raw_image \u003d fn_mock","commit_id":"3467dc8ddab6344f84fc90b238c3fdde9d55f82c"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"15eb3630d591fd13b93b7e5d4daa047435d21b2d","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    def setUp(self):"},{"line_number":53,"context_line":"        super(ImageBackendFixture, self).setUp()"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        # Mock template functions passed to cache"},{"line_number":56,"context_line":"        self.mock_fetch_image \u003d mock.create_autospec(libvirt_utils.fetch_image)"},{"line_number":57,"context_line":"        self.useFixture(fixtures.MonkeyPatch("},{"line_number":58,"context_line":"            \u0027nova.virt.libvirt.utils.fetch_image\u0027, self.mock_fetch_image))"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_aa9a8d12","line":55,"updated":"2016-12-01 22:55:35.000000000","message":"The formatting throughout the chunk is awkward but I\u0027m not sure there\u0027s any good solution. I\u0027d prefer not to see \\ and break at the first ( and do a small indent. But that will present its own problems.\n\nWhat\u0027s here is fine.\n\nIn fact it may actually be best, now that I look more closely, because it chunks the parts of speech visibly.","commit_id":"1fd6f4b963dfd843a8eeb2936594d1f2f383df76"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"b6074ed787fed7e84fa41133fd15279e47cb1bf6","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        self.useFixture(fixtures.MonkeyPatch("},{"line_number":58,"context_line":"            \u0027nova.virt.libvirt.utils.fetch_image\u0027, self.mock_fetch_image))"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        self.mock_fetch_raw_image \u003d \\"},{"line_number":61,"context_line":"            mock.create_autospec(libvirt_utils.fetch_raw_image)"},{"line_number":62,"context_line":"        self.useFixture(fixtures.MonkeyPatch("},{"line_number":63,"context_line":"            \u0027nova.virt.libvirt.utils.fetch_raw_image\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a74a57a_ffe565db","line":60,"range":{"start_line":60,"start_character":36,"end_line":60,"end_character":37},"updated":"2016-11-29 11:32:34.000000000","message":"I thought we were going to avoid such style.","commit_id":"1fd6f4b963dfd843a8eeb2936594d1f2f383df76"}],"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"b6074ed787fed7e84fa41133fd15279e47cb1bf6","unresolved":false,"context_lines":[{"line_number":9332,"context_line":""},{"line_number":9333,"context_line":"        disk_info \u003d disk_info_byname.values()"},{"line_number":9334,"context_line":""},{"line_number":9335,"context_line":"        with test.nested("},{"line_number":9336,"context_line":"            mock.patch.object(libvirt_driver.libvirt_utils, \u0027fetch_image\u0027),"},{"line_number":9337,"context_line":"            mock.patch.object(drvr, \u0027_create_ephemeral\u0027),"},{"line_number":9338,"context_line":"            mock.patch.object(imagebackend.Image, \u0027verify_base_size\u0027),"},{"line_number":9339,"context_line":"            mock.patch.object(imagebackend.Image, \u0027get_disk_size\u0027)"},{"line_number":9340,"context_line":"        ) as (fetch_image_mock, create_ephemeral_mock, verify_base_size_mock,"},{"line_number":9341,"context_line":"              disk_size_mock):"},{"line_number":9342,"context_line":"            drvr._create_images_and_backing(self.context, instance,"},{"line_number":9343,"context_line":"                                            CONF.instances_path, disk_info)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a74a57a_a2b83212","line":9340,"range":{"start_line":9335,"start_character":0,"end_line":9340,"end_character":77},"updated":"2016-11-29 11:32:34.000000000","message":"This could be removed with ImageBackendFixture, right?","commit_id":"1fd6f4b963dfd843a8eeb2936594d1f2f383df76"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"b6074ed787fed7e84fa41133fd15279e47cb1bf6","unresolved":false,"context_lines":[{"line_number":10652,"context_line":"            specified_fs\u003dNone, context\u003dself.context)"},{"line_number":10653,"context_line":"        backend.disks[\u0027disk.eph0\u0027].cache.assert_called_once_with("},{"line_number":10654,"context_line":"            fetch_func\u003dmock.ANY, context\u003dself.context,"},{"line_number":10655,"context_line":"            filename\u003dfilename, size\u003d100 * units.Gi, ephemeral_size\u003dmock.ANY,"},{"line_number":10656,"context_line":"            specified_fs\u003dNone)"},{"line_number":10657,"context_line":""},{"line_number":10658,"context_line":"    @mock.patch.object(nova.virt.libvirt.imagebackend.Image, \u0027cache\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a74a57a_62f7fad2","line":10655,"range":{"start_line":10655,"start_character":67,"end_line":10655,"end_character":75},"updated":"2016-11-29 11:32:34.000000000","message":"it\u0027s weird","commit_id":"1fd6f4b963dfd843a8eeb2936594d1f2f383df76"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e9e098d3d04b332a19f10b21c6029f51cad7d0e4","unresolved":false,"context_lines":[{"line_number":10589,"context_line":"        drvr._create_image(self.context, instance, disk_info[\u0027mapping\u0027],"},{"line_number":10590,"context_line":"                           block_device_info\u003dbdi, **create_image_kwargs)"},{"line_number":10591,"context_line":""},{"line_number":10592,"context_line":"        backend.mock_create_swap.assert_called_once_with("},{"line_number":10593,"context_line":"            target\u003d\u0027swap_%i\u0027 % expected, swap_mb\u003dexpected,"},{"line_number":10594,"context_line":"            context\u003dself.context)"},{"line_number":10595,"context_line":"        backend.disks[\u0027disk.swap\u0027].cache.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_6a47b81d","line":10592,"range":{"start_line":10592,"start_character":8,"end_line":10592,"end_character":56},"updated":"2016-12-07 15:58:31.000000000","message":"I\u0027m not crazy about the driver tests asserting mocks called within the backend. It\u0027s not the worst, but it requires the person writing the tests to know those mocked methods are in the image backend fixture and to remember to make assertions on how they are called, which I could see people that don\u0027t have this all in their head remembering to do. But I don\u0027t have a great alternative either.","commit_id":"6edf11aff59d95afe733ad8a7db908826a53271c"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"98499fb70a18f79f59bf94d55fca1e59319dd747","unresolved":false,"context_lines":[{"line_number":10589,"context_line":"        drvr._create_image(self.context, instance, disk_info[\u0027mapping\u0027],"},{"line_number":10590,"context_line":"                           block_device_info\u003dbdi, **create_image_kwargs)"},{"line_number":10591,"context_line":""},{"line_number":10592,"context_line":"        backend.mock_create_swap.assert_called_once_with("},{"line_number":10593,"context_line":"            target\u003d\u0027swap_%i\u0027 % expected, swap_mb\u003dexpected,"},{"line_number":10594,"context_line":"            context\u003dself.context)"},{"line_number":10595,"context_line":"        backend.disks[\u0027disk.swap\u0027].cache.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_4aa2fc9b","line":10592,"range":{"start_line":10592,"start_character":8,"end_line":10592,"end_character":56},"in_reply_to":"3a71b18c_6a47b81d","updated":"2016-12-07 16:04:09.000000000","message":"It\u0027s a lesser of 2 evils, tbh. There are a bunch of these callbacks spread throughout driver. I pulled them all into 1 place, because we will never want to call any of them in any test.\n\nThis gets deleted a bit down the line when we replace this stuff in driver, anyway.","commit_id":"6edf11aff59d95afe733ad8a7db908826a53271c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e9e098d3d04b332a19f10b21c6029f51cad7d0e4","unresolved":false,"context_lines":[{"line_number":10593,"context_line":"            target\u003d\u0027swap_%i\u0027 % expected, swap_mb\u003dexpected,"},{"line_number":10594,"context_line":"            context\u003dself.context)"},{"line_number":10595,"context_line":"        backend.disks[\u0027disk.swap\u0027].cache.assert_called_once_with("},{"line_number":10596,"context_line":"            fetch_func\u003dmock.ANY, filename\u003d\u0027swap_%i\u0027 % expected,"},{"line_number":10597,"context_line":"            size\u003dexpected * units.Mi, context\u003dself.context, swap_mb\u003dexpected)"},{"line_number":10598,"context_line":""},{"line_number":10599,"context_line":"    @mock.patch.object(nova.virt.libvirt.imagebackend.Image, \u0027cache\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_eaeca82b","line":10596,"range":{"start_line":10596,"start_character":23,"end_line":10596,"end_character":31},"updated":"2016-12-07 15:58:31.000000000","message":"Couldn\u0027t this be backend.mock_create_swap?","commit_id":"6edf11aff59d95afe733ad8a7db908826a53271c"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"98499fb70a18f79f59bf94d55fca1e59319dd747","unresolved":false,"context_lines":[{"line_number":10593,"context_line":"            target\u003d\u0027swap_%i\u0027 % expected, swap_mb\u003dexpected,"},{"line_number":10594,"context_line":"            context\u003dself.context)"},{"line_number":10595,"context_line":"        backend.disks[\u0027disk.swap\u0027].cache.assert_called_once_with("},{"line_number":10596,"context_line":"            fetch_func\u003dmock.ANY, filename\u003d\u0027swap_%i\u0027 % expected,"},{"line_number":10597,"context_line":"            size\u003dexpected * units.Mi, context\u003dself.context, swap_mb\u003dexpected)"},{"line_number":10598,"context_line":""},{"line_number":10599,"context_line":"    @mock.patch.object(nova.virt.libvirt.imagebackend.Image, \u0027cache\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_2a022070","line":10596,"range":{"start_line":10596,"start_character":23,"end_line":10596,"end_character":31},"in_reply_to":"3a71b18c_eaeca82b","updated":"2016-12-07 16:04:09.000000000","message":"Yes, but then I\u0027ve have to change it again in 1 or 2 patches when I replace it with a wrapper, which is what this patch is actually about. All we\u0027re doing here is saying we don\u0027t care what the callback was, as long as the result was the correct call to _create_swap. This way it remains true when we replace it with the wrapper.","commit_id":"6edf11aff59d95afe733ad8a7db908826a53271c"}]}
