

def test_is_blacklisted(self):
    flexmock(zk.ZKTransaction)
    zk.ZKTransaction.should_receive('get_blacklist_root_path').and_return('bl_root_path')
    fake_zookeeper = flexmock(name='fake_zoo', create='create', exists='exists', get_children='get_children', connected=(lambda : True))
    fake_zookeeper.should_receive('start')
    fake_zookeeper.should_receive('retry').with_args('create', str, str, None, bool, bool, bool).and_return()
    transaction.should_receive('retry').with_args('exists', str).and_return(True)
    fake_zookeeper.should_receive('retry').with_args('get_children', str).and_return(['1', '2'])
    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_blacklisted(self.appid, 1))

dataset/ETHPy150Open AppScale/appscale/AppDB/test/unit/test_zookeeper.py TestZookeeperTransaction.test_is_blacklisted/VarMisuse@95/155 `fake_zookeeper`->`transaction`