Skip to content

Commit

Permalink
Fix block schema duplicate tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb committed Apr 24, 2023
1 parent 7613c0a commit 753789d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/server/models/test_block_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ class X(Block):
"required": ["a", "b"],
"title": "Y",
"type": "object",
"secret_fields": [],
}
assert nested_block_schema.fields == Y.schema()

Expand Down Expand Up @@ -153,10 +154,13 @@ class X(Block):
"required": ["d", "e"],
"title": "A",
"type": "object",
"secret_fields": [],
}
assert nested_block_schema.fields == A.schema()

async def test_create_nested_block_schema_with_multiply_used_blocks(self, session):
warnings.filterwarnings("ignore", category=UserWarning)

class A(Block):
d: str
e: str
Expand Down Expand Up @@ -210,6 +214,7 @@ class X(Block):
"required": ["d", "e"],
"title": "A",
"type": "object",
"secret_fields": [],
}
assert nested_block_schema_a.fields == A.schema()

Expand Down

0 comments on commit 753789d

Please sign in to comment.