def test_update_markdown(client, running_with_backend): artifacts.update_markdown(task_run_artifact_id="trid", markdown="markdown_here") assert client.update_task_run_artifact.called assert client.update_task_run_artifact.call_args[1] == { "data": {"markdown": "markdown_here"}, "task_run_artifact_id": "trid", }
def test_old_update_markdown(client, running_with_backend): with pytest.warns( UserWarning, match="has been moved to `prefect.backend.update_markdown_artifact`", ): artifacts.update_markdown(task_run_artifact_id="trid", markdown="markdown_here") assert client.update_task_run_artifact.called assert client.update_task_run_artifact.call_args[1] == { "data": {"markdown": "markdown_here"}, "task_run_artifact_id": "trid", }
def test_update_markdown_not_using_backend(client): artifacts.update_markdown(task_run_artifact_id="trid", markdown="markdown_here") assert not client.update_task_run_artifact.called