示例#1
0
 def test_invalid_type_for_optional_value(self):
     with pytest.raises(errors.Error, match="should"):
         bonsai_asset.validate("a", dict(a=3), False, dict)
示例#2
0
 def test_missing_required(self):
     with pytest.raises(errors.Error, match="required"):
         bonsai_asset.validate("a", {}, True, str)
示例#3
0
 def test_invalid_type(self):
     with pytest.raises(errors.Error, match="should"):
         bonsai_asset.validate("a", dict(a=3), True, str)
示例#4
0
 def test_valid_values(self, name, args, required, typ):
     bonsai_asset.validate(name, args, required, typ)