Coverage for databases/sync_tests/test_delete_many.py: 100%

7 statements  

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

1from prisma import Prisma 

2 

3# TODO: more tests 

4 

5 

6def test_delete_many(client: Prisma) -> None: 

7 """Standard usage""" 

8 posts = [ 

9 client.post.create({'title': 'Foo post', 'published': False}), 

10 client.post.create({'title': 'Bar post', 'published': False}), 

11 ] 

12 count = client.post.delete_many() 

13 assert count >= 1 

14 

15 for post in posts: 

16 assert client.post.find_unique(where={'id': post.id}) is None