

def test_is_xg(self):
    fake_zookeeper = flexmock(name='fake_zoo', exists='exists', connected=(lambda : True))
    fake_zookeeper.should_receive('start')
    transaction.should_receive('retry').with_args('exists', str).and_return(True)
    flexmock(kazoo.client)
    kazoo.client.should_receive('KazooClient').and_return(fake_zookeeper)
    transaction = zk.ZKTransaction(host='something', start_gc=False)
    self.assertEquals(True, transaction.is_xg(self.appid, 1))

dataset/ETHPy150Open AppScale/appscale/AppDB/test/unit/test_zookeeper.py TestZookeeperTransaction.test_is_xg/VarMisuse@38/58 `fake_zookeeper`->`transaction`