def test_var_mandatory_success(): """ Test var mandatory """ variables = Variables() variables.add('Var1') variables.add('Var2', required=True) context = {'Var2': 'value2'} variables.check_mandatory_param(context)
def test_var_mandatory_fail(): """ Test var mandatory """ with pytest.raises(VariableMandatoryException): variables = Variables() variables.add('Var1') variables.add('Var2', required=True) context = {'Var1': 'value1'} variables.check_mandatory_param(context)