def query_cache_by_object(self, zenpy_object):
        """ Convenience method for testing. Given an object, return the cached version """
        object_type = get_object_type(zenpy_object)
        cache_key = self._cache_key_attribute(object_type)
        return self.get(object_type, getattr(zenpy_object, cache_key))
def query_cache_by_object ( self , zenpy_object ) : object_type = get_object_type ( zenpy_object ) cache_key = self . _cache_key_attribute ( object_type ) return self . get ( object_type , getattr ( zenpy_object , cache_key ) )
Convenience method for testing. Given an object, return the cached version