Exemplo n.º 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)
Exemplo n.º 2
0
 def test_missing_required(self):
     with pytest.raises(errors.Error, match="required"):
         bonsai_asset.validate("a", {}, True, str)
Exemplo n.º 3
0
 def test_invalid_type(self):
     with pytest.raises(errors.Error, match="should"):
         bonsai_asset.validate("a", dict(a=3), True, str)
Exemplo n.º 4
0
 def test_valid_values(self, name, args, required, typ):
     bonsai_asset.validate(name, args, required, typ)