def test_uri_dump_malformed(): schema = URISchema(strict=True) assert_that( calling(schema.dump).with_args( dict( foo="example", ), ), raises(ValidationError), )