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