def test_update_metrics_fake_dataset_not_found():
dataset = factories.PublishedDatasetFactory(id=UUID("c955e904-e3dd-4d7e-99f1-3fed446f96d1"))
out = StringIO()
err = StringIO()
call_command(
"update_metrics",
fake_datasets=["c955e904-e3dd-4d7e-99f1-999911112222"],
stdout=out,
stderr=err,
)
assert "Dataset not found: c955e904-e3dd-4d7e-99f1-999911112222" in err.getvalue()
assert getattr(dataset, "metrics", None) is None