def test_get_xg_path(self):
    # mock out initializing a ZK connection
    flexmock(zk.ZKTransaction)

    fake_zookeeper = flexmock(name='fake_zoo')
    fake_zookeeper.should_receive('start')
    fake_zookeeper.should_receive('retry')

    flexmock(kazoo.client)
    kazoo.client.should_receive('KazooClient').and_return(fake_zookeeper)
 
    tx_id = 100
    tx_str = zk.APP_TX_PREFIX + "%010d" * tx_id
    zk.ZKTransaction.should_receive('get_app_root_path') \
      .and_return("app_root_path")

    expected = zk.PATH_SEPARATOR.join(["app_root_path", zk.APP_TX_PATH,
      tx_str, zk.XG_PREFIX]) 

    transaction = zk.ZKTransaction(host="something", start_gc=False)
    self.assertEquals(expected, transaction.get_xg_path("xxx", 100))
dataset/ETHPy150Open AppScale/appscale/AppDB/test/unit/test_zookeeper.py/TestZookeeperTransaction.test_get_xg_path/operator `%` -> `*`