Portal/rsconcept/backend/shared/testing_utils.py
Ivan 90dcf7a8eb R: restructure backend
Warning! This will reset database migrations. Data should be imported manually
2024-07-25 19:12:31 +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)