I’ve found that testing is generally pretty great ...
# dagster-feedback
I’ve found that testing is generally pretty great in Dagster. Testing ops, jobs, and assets all works really well. Using the new
in jobs doesn’t have a great story for testing yet though. I think what I’d like is a testing utility that’s something like “Pretend that my_cool_asset was materialized with this_particular_value”, maybe a context manager for that.
Here’s my job:
Copy code
def my_job():
    asset_val = upstream_asset.to_source_asset()
    op1_result = op1()
    op2_result = op2(asset_val, op1_result)
I might try to do something like
Copy code
def test_my_job():
    with unittest.mock.patch("path.to.upstream_asset.to_source_asset") as mock_to_source_asset:
        mock_to_source_asset.return_val = "foo"
but I’m not sure this will work?
Maybe I could
my asset, but my
is pretty complicated here
❤️ 1