Beispiel #1
0
    def test_variables_can_be_added(self):
        cd = CommandDefinition()
        cd.var("x", 5).vars({"y": 6, "z": 7})

        obj = cd.to_map()
        assert 5 == obj["vars"]["x"]
        assert 6 == obj["vars"]["y"]
        assert 7 == obj["vars"]["z"]
Beispiel #2
0
 def test_invalid_var(self):
     cd = CommandDefinition()
     with pytest.raises(TypeError):
         cd.var(42, "v")