Portal/rsconcept/backend/apps/rsform/tests/testing_utils.py
IRBorisov 2759f10d09
Some checks failed
Backend CI / build (3.12) (push) Has been cancelled
Frontend CI / build (18.x) (push) Has been cancelled
Initial commit
2024-06-07 20:17:03 +03:00

9 lines
254 B
Python

''' Utilities for testing. '''
from apps.rsform.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)