Skip to content

Commit 6f4a9d9

Browse files
author
matmoncon
committed
test: add update_forward_refs when tests run on V1 of pydantic
1 parent 26a9d74 commit 6f4a9d9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/fixtures/db_setup.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
RelationshipPropertyCardinality,
1818
RelationshipPropertyDirection,
1919
)
20+
from pyneo4j_ogm.pydantic_utils import IS_PYDANTIC_V2
2021

2122

2223
class Developer(NodeModel):
@@ -271,3 +272,13 @@ def coffee_shop_model_instances(setup_test_data):
271272
rating_five_model = CoffeeShop._inflate(rating_five)
272273

273274
return (rating_five_model,)
275+
276+
277+
if not IS_PYDANTIC_V2:
278+
Developer.update_forward_refs()
279+
Coffee.update_forward_refs()
280+
Consumed.update_forward_refs()
281+
WorkedWith.update_forward_refs()
282+
CoffeeShop.update_forward_refs()
283+
Sells.update_forward_refs()
284+
Bestseller.update_forward_refs()

0 commit comments

Comments
 (0)