def test_validate_favorites_json__failure_missing_field(self): data = { 'item': str(uuid.uuid4()), } with pytest.raises(ValidationError): Favorites.verify_json(data)
def test_validate_favorites_json__success(self): data = { 'user': str(uuid.uuid4()), 'item': str(uuid.uuid4()), } Favorites.verify_json(data)
def test_validate_favorites_json__failure_wrong_type_field(self): data = { 'user': int(uuid.uuid4()), 'item': str(uuid.uuid4()), } with pytest.raises(ValidationError): Favorites.verify_json(data)