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