diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ikweb/tools/functional_test.py	Mon Dec 01 00:27:22 2008 +0800
@@ -0,0 +1,29 @@
+from lazy.www import c
+
+def create_player():
+    datas = {'game_id':1,
+             'army_score_main':10000,
+             'building_score_main':1000,
+             'building_score_secondary':100,
+             'name':'tplayer',
+             'research_score_main':122,
+             'research_score_secondary':122,
+             'score':10000,
+             'trader_score_secondary':1000000    
+    }
+    c("http://localhost:8080/player/create").post(datas)
+    
+def edit_player():
+    datas = {'game_id':1,
+             'name':'tfplayer'
+             }
+    c("http://localhost:8080/player/edit").post(datas)
+    
+import sys
+
+act = sys.argv[1]
+modelname = sys.argv[2]
+
+funcname = "%s_%s" % (act,modelname)
+print 'test',funcname
+eval(funcname)()