from radiuma_api.execution_context import ExecutionContext
from radiuma_api.io_port import OutPort, InPort, ImageType
from radiuma_api.asset import Asset
# Codes Go Below:


def test_context_put_get():
    ctx = ExecutionContext()
    outp = OutPort("o", ImageType())
    inp = InPort("i", ImageType())

    outp.connect(inp)

    asset = Asset(["img1"], "images")
    ctx.put(outp, asset)

    assert ctx.get(inp).data == ["img1"]
