def test_task_with_flat_values(self): t = Task("task 0") t.priority(42) obj = t.to_map() assert "task 0" == t.get_name() assert "task 0" == obj["name"] assert 42 == obj["priority"]
def test_invalid_priority(self): t = Task("task 0") with pytest.raises(TypeError): t.priority("hello world")