def METHOD_NAME(session):
    """
    Test that we get an exception raised when we try
    to add a new row with an invalid state.
    """
    workflow_run_data = dict(
        workflow_name="DUMMY_WORKFLOW_NAME",
        parameters={"DUMMY_PARAM_NAME": "DUMMY_PARAM_VALUE"},
        state="INVALID_STATE",
    )
    with pytest.raises(DataError):
        WorkflowRuns.set_state(**workflow_run_data, session=session)