Browse Source

fix tests

auth
clowwindy 10 years ago
parent
commit
b785d95f66
  1. 16
      tests/coverage_server.py

16
tests/coverage_server.py

@ -1,11 +1,11 @@
#!/usr/bin/env python #!/usr/bin/env python
import tornado.ioloop if __name__ == '__main__':
import tornado.web import tornado.ioloop
import urllib import tornado.web
import urllib
class MainHandler(tornado.web.RequestHandler):
class MainHandler(tornado.web.RequestHandler):
def get(self): def get(self):
with open('/tmp/shadowsocks-coverage', 'rb') as f: with open('/tmp/shadowsocks-coverage', 'rb') as f:
coverage = f.read().strip() coverage = f.read().strip()
@ -14,10 +14,10 @@ class MainHandler(tornado.web.RequestHandler):
'?style=flat') % '?style=flat') %
urllib.quote(coverage)) urllib.quote(coverage))
application = tornado.web.Application([ application = tornado.web.Application([
(r"/shadowsocks", MainHandler), (r"/shadowsocks", MainHandler),
]) ])
if __name__ == "__main__": if __name__ == "__main__":
application.listen(8888, address='127.0.0.1') application.listen(8888, address='127.0.0.1')
tornado.ioloop.IOLoop.instance().start() tornado.ioloop.IOLoop.instance().start()

Loading…
Cancel
Save