def check_redis_structure(self, obj, be):
        session = obj.session
        backend = be.backend
        #
        # field id should be in instance keys
        keys = backend.instance_keys(obj)
        self.assertTrue(be.id in keys)
        #
        # the field has no data, so there is no key in the database
        lkeys = yield backend.model_keys(self.model._meta)
        self.assertFalse(be.id in lkeys)
        #
        # Lets add data
        yield self.adddata(obj)
        # The field id should be in the server keys
        if backend.name == 'redis':
            lkeys = yield backend.model_keys(self.model._meta)
            self.assertTrue(be.id in lkeys)
        #
        # Delete the object
        yield session.delete(obj)
        # The backend id should not be in all model keys
        lkeys = yield backend.model_keys(self.model._meta)
        self.assertFalse(be.id in lkeys)
dataset/ETHPy150Open lsbardel/python-stdnet/tests/all/multifields/struct.py/MultiFieldMixin.check_redis_structure/original