

def test_create_node(self):
    flexmock(zk.ZKTransaction)
    zk.ZKTransaction.should_receive('get_transaction_prefix_path').with_args(self.appid).and_return('/rootpath')
    fake_zookeeper = flexmock(name='fake_zoo', create='create', connected=(lambda : True))
    fake_zookeeper.should_receive('start')
    fake_zookeeper.should_receive('retry').with_args('create', str, value=str, acl=None, makepath=bool, sequence=bool, ephemeral=bool)
    flexmock(kazoo.client)
    kazoo.client.should_receive('KazooClient').and_return(fake_zookeeper)
    path_to_create = ('/rootpath/' + self.appid)
    transaction = zk.ZKTransaction(host='something', start_gc=False)
    self.assertEquals(None, path_to_create.create_node(('/rootpath/' + self.appid), 'now'))

dataset/ETHPy150Open AppScale/appscale/AppDB/test/unit/test_zookeeper.py TestZookeeperTransaction.test_create_node/VarMisuse@152/233 `transaction`->`path_to_create`