Coverage for tests/test_generation/exhaustive/partials.py: 0%

6 statements  

« prev     ^ index     » next       coverage.py v7.2.7, created at 2024-08-27 18:25 +0000

1from prisma.models import Post, User 

2 

3Post.create_partial('PostWithAuthor', include=['id', 'title', 'author']) 

4 

5User.create_partial('UserOnlyName', include=['name']) 

6Post.create_partial( 

7 'PostWithCustomAuthor', 

8 include=['id', 'title', 'author'], 

9 relations={ 

10 'author': 'UserOnlyName', 

11 }, 

12) 

13 

14User.create_partial('UserWithPosts', include=['name', 'posts']) 

15Post.create_partial( 

16 'PostWithNestedRelations', 

17 include=['id', 'title', 'author'], 

18 relations={ 

19 'author': 'UserWithPosts', 

20 }, 

21)