@@ -268,7 +268,8 @@ def test_basic_type_formats_invalid(
268268 @pytest .mark .parametrize (
269269 "value,expected" ,
270270 [
271- ("dGVzdA==" , "test" ),
271+ ("dGVzdA==" , b"test" ),
272+ ("test" , b"\xb5 \xeb -" ),
272273 ],
273274 )
274275 def test_string_byte (self , unmarshallers_factory , value , expected ):
@@ -374,23 +375,17 @@ def test_string_uuid_invalid(self, unmarshallers_factory):
374375 assert len (exc_info .value .schema_errors ) == 1
375376 assert f"is not a 'uuid'" in exc_info .value .schema_errors [0 ].message
376377
377- @pytest .mark .xfail (
378- reason = (
379- "Formats raise error for other types. "
380- "See https://github.com/python-openapi/openapi-schema-validator/issues/66"
381- )
382- )
383378 @pytest .mark .parametrize (
384379 "type,format,value,expected" ,
385380 [
386381 ("string" , "float" , "test" , "test" ),
387382 ("string" , "double" , "test" , "test" ),
388- ("string " , "byte" , "test" , "test" ),
389- ("integer" , "date" , "10" , 10 ),
390- ("integer" , "date-time" , "10" , 10 ),
383+ ("integer " , "byte" , 10 , 10 ),
384+ ("integer" , "date" , 10 , 10 ),
385+ ("integer" , "date-time" , 10 , 10 ),
391386 ("string" , "int32" , "test" , "test" ),
392387 ("string" , "int64" , "test" , "test" ),
393- ("integer" , "password" , "10" , 10 ),
388+ ("integer" , "password" , 10 , 10 ),
394389 ],
395390 )
396391 def test_formats_ignored (
@@ -1679,7 +1674,7 @@ def test_not_nullable(self, unmarshallers_factory, type):
16791674 @pytest .mark .parametrize (
16801675 "type,format,value,unmarshalled" ,
16811676 [
1682- ("string" , "byte" , "dGVzdA==" , "test" ),
1677+ ("string" , "byte" , "dGVzdA==" , b "test" ),
16831678 ("string" , "binary" , b"test" , b"test" ),
16841679 ],
16851680 )
@@ -1728,7 +1723,8 @@ def test_basic_type_oas30_formats_invalid(
17281723 reason = (
17291724 "OAS 3.0 string type checker allows byte. "
17301725 "See https://github.com/python-openapi/openapi-schema-validator/issues/64"
1731- )
1726+ ),
1727+ strict = True ,
17321728 )
17331729 def test_string_format_binary_invalid (self , unmarshallers_factory ):
17341730 schema = {
@@ -1748,7 +1744,8 @@ def test_string_format_binary_invalid(self, unmarshallers_factory):
17481744 reason = (
17491745 "Rraises TypeError not SchemaError. "
17501746 "See ttps://github.com/python-openapi/openapi-schema-validator/issues/65"
1751- )
1747+ ),
1748+ strict = True ,
17521749 )
17531750 @pytest .mark .parametrize (
17541751 "types,value" ,
@@ -1928,7 +1925,8 @@ def unmarshallers_factory(self):
19281925 reason = (
19291926 "OpenAPI 3.1 schema validator uses OpenAPI 3.0 format checker."
19301927 "See https://github.com/python-openapi/openapi-core/issues/506"
1931- )
1928+ ),
1929+ strict = True ,
19321930 )
19331931 @pytest .mark .parametrize (
19341932 "type,format" ,
0 commit comments