Mercurial > eagle-eye
comparison ikweb/tools/functional_test.py @ 247:7747bbe5b68e
start to develope Information Exchange Center of Ikariam Game. (prototpye)
author | "Hisn Yi, Chen <ossug.hychen@gmail.com>" |
---|---|
date | Mon, 01 Dec 2008 00:27:22 +0800 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
246:60c4b4b78a01 | 247:7747bbe5b68e |
---|---|
1 from lazy.www import c | |
2 | |
3 def create_player(): | |
4 datas = {'game_id':1, | |
5 'army_score_main':10000, | |
6 'building_score_main':1000, | |
7 'building_score_secondary':100, | |
8 'name':'tplayer', | |
9 'research_score_main':122, | |
10 'research_score_secondary':122, | |
11 'score':10000, | |
12 'trader_score_secondary':1000000 | |
13 } | |
14 c("http://localhost:8080/player/create").post(datas) | |
15 | |
16 def edit_player(): | |
17 datas = {'game_id':1, | |
18 'name':'tfplayer' | |
19 } | |
20 c("http://localhost:8080/player/edit").post(datas) | |
21 | |
22 import sys | |
23 | |
24 act = sys.argv[1] | |
25 modelname = sys.argv[2] | |
26 | |
27 funcname = "%s_%s" % (act,modelname) | |
28 print 'test',funcname | |
29 eval(funcname)() |