Skip to content

Commit

Permalink
tests - pydantic release adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
commonism committed Aug 15, 2023
1 parent b3e2add commit 07b2f51
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion aiopenapi3/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.3.0a6"
__version__ = "0.3.0a7"
8 changes: 4 additions & 4 deletions tests/apiv2_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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()),
Expand All @@ -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()
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 07b2f51

Please sign in to comment.