def METHOD_NAME(self, expected, search_type, query=None):
    self.login_as(user=self.user)
    kwargs = {}
    if query:
        kwargs["query"] = query
    response = self.get_success_response(
        self.organization.slug, type=search_type.value, **kwargs
    )
    assert response.data == serialize(expected)