mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 21:10:38 +03:00
9 lines
254 B
Python
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)
|