def assertCacheUpdated(self, zenpy_object, attr, expected):
if self.zenpy_client.cache.should_cache(zenpy_object):<EOL><INDENT>cached_object = self.zenpy_client.cache.query_cache_by_object(zenpy_object)<EOL>assert cached_object is not None<EOL>self.assertTrue(getattr(zenpy_object, attr) == expected)<EOL><DEDENT>
If an object should be cached, assert that the specified attribute is equal to 'expected'.