diff --git a/libpathod/app.py b/libpathod/pathod.py similarity index 100% rename from libpathod/app.py rename to libpathod/pathod.py diff --git a/pathod b/pathod index a4e81e919..7fbf3bd79 100755 --- a/pathod +++ b/pathod @@ -1,6 +1,6 @@ #!/usr/bin/env python import argparse, sys -from libpathod import app, utils, version +from libpathod import pathod, utils, version import tornado.ioloop if __name__ == "__main__": @@ -33,7 +33,7 @@ if __name__ == "__main__": settings = dict( staticdir=args.staticdir ) - application = app.PathodApp(**settings) + application = pathod.PathodApp(**settings) for i in args.anchors: try: rex, spec = utils.parse_anchor_spec(i, settings) @@ -50,6 +50,6 @@ if __name__ == "__main__": ssl = None print "%s listening on port %s"%(version.NAMEVERSION, args.port) try: - app.run(application, args.port, ssl) + pathod.run(application, args.port, ssl) except KeyboardInterrupt: pass diff --git a/test/test_app.py b/test/test_pathod.py similarity index 90% rename from test/test_app.py rename to test/test_pathod.py index db030f9af..bb78e094a 100644 --- a/test/test_app.py +++ b/test/test_pathod.py @@ -1,10 +1,10 @@ import libpry -from libpathod import app +from libpathod import pathod from tornado import httpserver class uApplication(libpry.AutoTree): def test_anchors(self): - a = app.PathodApp(staticdir=None) + a = pathod.PathodApp(staticdir=None) a.add_anchor("/foo", "200") assert a.get_anchors() == [("/foo", "200")] a.add_anchor("/bar", "400") @@ -15,7 +15,7 @@ class uApplication(libpry.AutoTree): assert a.get_anchors() == [("/foo", "200")] def test_logs(self): - a = app.PathodApp(staticdir=None) + a = pathod.PathodApp(staticdir=None) a.LOGBUF = 3 a.add_log({}) assert a.log[0]["id"] == 0 @@ -36,7 +36,7 @@ class uPages(libpry.AutoTree): def dummy_page(self, path): # A hideous, hideous kludge, but Tornado seems to have no more sensible # way to do this. - a = app.PathodApp(staticdir=None) + a = pathod.PathodApp(staticdir=None) for h in a.handlers[0][1]: if h.regex.match(path): klass = h.handler_class