)]}'
{"nova/tests/unit/virt/libvirt/fake_imagebackend.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"2a8efb4eeb21ab06f5af5fc1a6100c0b43c8bae2","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        # it will return the same object we created here, and when the"},{"line_number":107,"context_line":"        # caller calls cache() it will raise the requested exception."},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        disk \u003d mock.create_autospec(imagebackend.Image)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        # NOTE(mdbooth): fake_cache and fake_import_file are for compatibility"},{"line_number":112,"context_line":"        # with existing tests which test got_files and imported_files. They"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_701e5010","line":109,"updated":"2018-12-14 10:41:28.000000000","message":"My patch also passed instance\u003dTrue here, but I\u0027m guessing that was just because I\u0027d spotted it in the Mock api and it seemed correct.","commit_id":"07ab2670d53f281eeea15da1e0fb675456173cb6"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"2a8efb4eeb21ab06f5af5fc1a6100c0b43c8bae2","unresolved":false,"context_lines":[{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        # Return a Mock to act as the class returned by Backend.backend()"},{"line_number":190,"context_line":"        # allowing static methods such as is_shared_block_storage to be used."},{"line_number":191,"context_line":"        return mock.Mock(spec\u003dimagebackend.Image, side_effect\u003dimage_init)"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def _fake_cache(self, fetch_func, filename, size\u003dNone, *args, **kwargs):"},{"line_number":194,"context_line":"        # Execute the template function so we can test the arguments it was"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_30ef78fc","line":191,"updated":"2018-12-14 10:41:28.000000000","message":"As mentioned on IRC, I had an unpushed patch from ages ago which did almost exactly this. The only difference was I subclassed imagebackend.Flat with the comment:\n\n+        # NOTE(mdbooth): we spec a subclass of imagebackend.Image here because\n+        # the subclass constructors have a different signature.\n\nI have no idea why this was necessary, but I assume it was because it doesn\u0027t seem like the first thing I thought of.","commit_id":"07ab2670d53f281eeea15da1e0fb675456173cb6"}]}
