def test_mark_delete_valid(rescue_sop_fx: Rescue, reporter: str, reason: str): """ Verifies Rescue.mark functions as expected when marking a case for deletion """ rescue_sop_fx.mark_delete(reporter, reason) assert rescue_sop_fx.marked_for_deletion.marked assert reporter == rescue_sop_fx.marked_for_deletion.reporter assert reason == rescue_sop_fx.marked_for_deletion.reason
def test_mark_delete_invalid(rescue_sop_fx: Rescue): """ Verify what happens when garbage gets thrown at `rescue.mark` """ with pytest.raises(TypeError): rescue_sop_fx.mark_delete(None, "sna") with pytest.raises(TypeError): rescue_sop_fx.mark_delete("sna", None) with pytest.raises(ValueError): rescue_sop_fx.mark_delete("unit_test", "")