def METHOD_NAME(self):
    Image.objects.create(id=1, title="Test", file=get_test_image_file())
    result = EditorHtmlImageEmbedHandler.expand_db_attributes(
        {
            "id": 1,
            "alt": "test-alt",
            "format": "left",
        }
    )
    self.assertTagInHTML(
        (
            '<img data-embedtype="image" data-id="1" data-format="left" '
            'data-alt="test-alt" class="richtext-image left" />'
        ),
        result,
        allow_extra_attrs=True,
    )