forked from kaansoral/adventureland
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtests.py
More file actions
31 lines (29 loc) · 835 Bytes
/
tests.py
File metadata and controls
31 lines (29 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from config import *
from functions import *
class MainHandler(webapp.RequestHandler):
@ndb.toplevel
def get(self,name):
domain=gdi(self)
if name=="hash":
start=datetime.now()
logging.info(pbkdf2_hex("test","123456",iterations=160))
logging.info(mssince(start))
elif name=="levels":
xp=200
for i in xrange(100):
new_xp=xp
while new_xp>=100: new_xp/=10
new_xp=int(new_xp)
while new_xp*10<=xp: new_xp*=10
xp=new_xp
self.response.out.write("level %s %sxp %s worms %s 40K's<br />"%((i+1),xp,xp/200.0,xp/40000.0))
xp*=1.25
elif name.startswith("pixi_"):
whtml(self,"utility/htmls/tests/%s.html"%name,domain=domain)
else:
self.response.out.write("test")
def post(self,name):
self.get(name)
application = webapp.WSGIApplication([
('/test/?(.*)', MainHandler)
],debug=is_sdk)