def test_set_retrieve_and_delete_object(self):
        template = {'username': 'user:%(id)s:username',
                    'email': 'user:%(id)s:email',
                    'phone': 'phone:%(id)s:phone'}
        indexes = {'id': 12345}
        data = {'username': 'Bob',
                'email': 'bob@example.com',
                'phone': '555-555-5555'}

        cache.set_object(self._cache, template, indexes, data)

        result = cache.retrieve_object(self._cache, template, indexes)
        self.assertEqual(
            {'username': b'Bob',
             'email': b'bob@example.com',
             'phone': b'555-555-5555'},
            result
            )

        cache.delete_object(self._cache, template, indexes)

        result = cache.retrieve_object(self._cache, template, indexes)
        self.assertEqual(None, result)
Test set_object, retrieve_object, and delete_object methods
dataset/ETHPy150Open refinery29/chassis/chassis/test/services/cache_test.py/CacheTest.test_set_retrieve_and_delete_object