def test_default_new():
    entity = Image.new(
        handle="ABBA", owner="0", dxfattribs={"image_size": (640, 200)}
    )
    assert entity.dxf.layer == "0"
    assert entity.dxf.insert is None  # set by add_image()
    assert entity.dxf.u_pixel is None  # set by add_image()
    assert entity.dxf.v_pixel is None  # set by add_image()
    assert entity.dxf.class_version == 0
    assert entity.dxf.image_size == (640, 200)
    assert entity.dxf.image_def_handle is None  # set by add_image()
    assert entity.dxf.flags == 3
    assert entity.dxf.clipping == 0
    assert entity.dxf.brightness == 50
    assert entity.dxf.contrast == 50
    assert entity.dxf.fade == 0
    assert entity.dxf.image_def_reactor_handle is None  # set by add_image()
    assert entity.dxf.clipping_boundary_type == 1
    assert entity.dxf.clip_mode == 0
    assert entity.boundary_path[0] == (-0.5, -0.5)
    assert entity.boundary_path[1] == (639.5, 199.5)
def image(doc):
    return Image.from_text(IMAGE, doc)
def entity():
    return Image.from_text(IMAGE)
def test_default_init():
    entity = Image()
    assert entity.dxftype() == "IMAGE"
    assert entity.dxf.handle is None
    assert entity.dxf.owner is None
def test_image_write_dxf():
    entity = Image.from_text(IMAGE)
    result = TagCollector.dxftags(entity)
    expected = basic_tags_from_text(EXPECTED)
    assert result == expected