def test_lazy_execution(): from bigchaindb.utils import Lazy lz = Lazy() lz.split(',')[1].split(' ').pop(1).strip() result = lz.run('Like humans, cats tend to favor one paw over another') assert result == 'cats' class Cat: def __init__(self, name): self.name = name cat = Cat('Shmui') lz = Lazy() lz.name.upper() result = lz.run(cat) assert result == 'SHMUI'
def query(self): return Lazy()