ConceptPortal-public/rsconcept/backend/shared/testing_utils.py
Ivan 642a94b565
Some checks are pending
Backend CI / build (3.12) (push) Waiting to run
Frontend CI / build (22.x) (push) Waiting to run
R: restructure backend DB
Warning! This will reset database migrations. Data should be imported manually
2024-07-25 19:12:59 +03:00

9 lines
255 B
Python

''' Utilities for testing. '''
from apps.library.models import LibraryItem
def response_contains(response, item: LibraryItem) -> bool:
''' Check if response contains specific item. '''
return any(x for x in response.data if x['id'] == item.pk)