def test_invalid_command(self): t = Task("task 0") with pytest.raises(TypeError): t.command("hello world")
def test_adding_command(self): t = Task("task 0") t.command(CmdGetProject().resolve()) obj = t.to_map() assert "git.get_project" == obj["commands"][0]["command"]