diff --git a/aiopenapi3/version.py b/aiopenapi3/version.py index d95fa8b2..f34e5d2d 100644 --- a/aiopenapi3/version.py +++ b/aiopenapi3/version.py @@ -1 +1 @@ -__version__ = "0.3.0a6" +__version__ = "0.3.0a9" diff --git a/tests/apiv1_test.py b/tests/apiv1_test.py index 6e55de20..986bdcb2 100644 --- a/tests/apiv1_test.py +++ b/tests/apiv1_test.py @@ -51,7 +51,7 @@ def randomPet(name=None): @pytest.mark.skipif(sys.version_info < (3, 9), reason="requires asyncio.to_thread") async def test_createPet(event_loop, server, client): h, r = await asyncio.to_thread(client._.createPet, **randomPet()) - assert type(r).model_json_schema() == client.components.schemas["Pet-Input"].get_type().model_json_schema() + assert type(r).model_json_schema() == client.components.schemas["PetInput"].get_type().model_json_schema() assert h["X-Limit-Remain"] == 5 r = await asyncio.to_thread(client._.createPet, data={"pet": {"name": r.name}}) diff --git a/tests/apiv2_test.py b/tests/apiv2_test.py index b142d665..11aec77c 100644 --- a/tests/apiv2_test.py +++ b/tests/apiv2_test.py @@ -125,7 +125,7 @@ async def test_model(event_loop, server, client): def randomPet(client, name=None, cat=False): if name: - Pet = client.components.schemas["Pet-Input"].get_type() + Pet = client.components.schemas["PetInput"].get_type() if not cat: Dog = typing.get_args(typing.get_args(Pet.model_fields["root"].annotation)[0])[1] dog = Dog( @@ -161,7 +161,7 @@ async def test_Request(event_loop, server, client): @pytest.mark.asyncio async def test_createPet(event_loop, server, client): data = { - "pet": client.components.schemas["WhiteCat-Input"] + "pet": client.components.schemas["WhiteCatInput"] .model( { "name": str(uuid.uuid4()), @@ -176,7 +176,7 @@ async def test_createPet(event_loop, server, client): print(json.dumps(data["pet"], indent=4)) r = await client._.createPet(data=data) - assert isinstance(r, client.components.schemas["Pet-Input"].get_type()) + assert isinstance(r, client.components.schemas["PetInput"].get_type()) r = await client._.createPet(data=randomPet(client, name=r.root.root.name)) Error = client.components.schemas["Error"].get_type() @@ -223,7 +223,7 @@ async def test_deletePet(event_loop, server, client): @pytest.mark.asyncio async def test_patchPet(event_loop, server, client): - Pet = client.components.schemas["Pet-Input"].get_type() + Pet = client.components.schemas["PetInput"].get_type() Dog = typing.get_args(typing.get_args(Pet.model_fields["root"].annotation)[0])[1] pets = [ Pet(