Permalink
Browse files

Rename Manager to Stango

  • Loading branch information...
1 parent 9be09dc commit cbe52adb929886786e0215d882275fb2ef08d4c1 @akheron committed Oct 21, 2010
Showing with 21 additions and 21 deletions.
  1. +1 −1 stango/__init__.py
  2. +2 −2 stango/main.py
  3. +2 −2 tests/__init__.py
  4. +2 −2 tests/test_generate.py
  5. +6 −6 tests/test_main.py
  6. +4 −4 tests/test_manager.py
  7. +2 −2 tests/test_server.py
  8. +2 −2 tests/test_views.py
View
2 stango/__init__.py
@@ -7,7 +7,7 @@
STANGO_TEMPLATE_DIR = os.path.join(os.path.dirname(__file__), 'templates')
-class Manager(object):
+class Stango(object):
HOOK_NAMES = ['post_render_hook']
def __init__(self):
View
4 stango/main.py
@@ -2,7 +2,7 @@
import sys
import types
-from stango import Manager
+from stango import Stango
def quickstart():
conf_code = '''\
@@ -123,7 +123,7 @@ def run():
print("conf.py doesn't define the 'files' variable", file=sys.stderr)
sys.exit(1)
- manager = Manager()
+ manager = Stango()
manager.files = config['files']
manager.index_file = config['index_file']
manager.template_dirs.insert(0, 'templates')
View
4 tests/__init__.py
@@ -64,14 +64,14 @@ def make_suite(cls):
def suite():
from . import \
- test_files, test_generate, test_main, test_manager, test_serve, \
+ test_files, test_generate, test_main, test_manager, test_server, \
test_views
suite = unittest.TestSuite()
suite.addTest(test_files.suite())
suite.addTest(test_generate.suite())
suite.addTest(test_main.suite())
suite.addTest(test_manager.suite())
- suite.addTest(test_serve.suite())
+ suite.addTest(test_server.suite())
suite.addTest(test_views.suite())
return suite
View
4 tests/test_generate.py
@@ -2,7 +2,7 @@
import os
import unittest
-from stango import Manager
+from stango import Stango
from stango.files import Files
from . import StangoTestCase, make_suite, view_value, view_template
@@ -12,7 +12,7 @@
class GenerateTestCase(StangoTestCase):
def setup(self):
self.tmp = self.tempdir()
- self.manager = Manager()
+ self.manager = Stango()
self.manager.index_file = 'index.html'
def test_generate_simple(self):
View
12 tests/test_main.py
@@ -4,7 +4,7 @@
import stango.autoreload
import stango.main
-from stango import Manager
+from stango import Stango
from . import StangoTestCase, make_suite
@@ -81,7 +81,7 @@ def test_defaults(self):
def fake_generate(mgr, outdir):
self.eq(outdir, 'out')
return mgr
- self.monkey_patch(Manager, 'generate', fake_generate)
+ self.monkey_patch(Stango, 'generate', fake_generate)
exc = self.assert_raises(SystemExit, stango.main.run)
manager = exc.args[0]
@@ -102,7 +102,7 @@ def post_render_hook(context, data):
def fake_generate(mgr, outdir):
self.eq(outdir, 'quux')
return mgr
- self.monkey_patch(Manager, 'generate', fake_generate)
+ self.monkey_patch(Stango, 'generate', fake_generate)
exc = self.assert_raises(SystemExit, stango.main.run)
manager = exc.args[0]
@@ -141,7 +141,7 @@ def fake_make_server(mgr, host, port, verbose):
self.eq(port, 8000)
self.eq(verbose, True)
return FakeHTTPServer()
- self.monkey_patch(Manager, 'make_server', fake_make_server)
+ self.monkey_patch(Stango, 'make_server', fake_make_server)
stango.main.run()
@@ -162,7 +162,7 @@ def fake_make_server(mgr, host, port, verbose):
self.eq(port, 9876)
self.eq(verbose, True)
return FakeHTTPServer()
- self.monkey_patch(Manager, 'make_server', fake_make_server)
+ self.monkey_patch(Stango, 'make_server', fake_make_server)
stango.main.run()
@@ -183,7 +183,7 @@ def fake_make_server(mgr, host, port, verbose):
self.eq(port, 9876)
self.eq(verbose, True)
return FakeHTTPServer()
- self.monkey_patch(Manager, 'make_server', fake_make_server)
+ self.monkey_patch(Stango, 'make_server', fake_make_server)
stango.main.run()
View
8 tests/test_manager.py
@@ -1,14 +1,14 @@
import os
import unittest
-from stango import Manager
+from stango import Stango
from stango.files import Files
from . import StangoTestCase, make_suite
-class ManagerTestCase(StangoTestCase):
+class StangoTestCase(StangoTestCase):
def setup(self):
- self.manager = Manager()
+ self.manager = Stango()
def test_manager_defaults(self):
self.eq(self.manager.files, Files())
@@ -36,4 +36,4 @@ def test_add_noncallable_hook(self):
def suite():
- return make_suite(ManagerTestCase)
+ return make_suite(StangoTestCase)
View
4 tests/test_server.py
@@ -1,4 +1,4 @@
-from stango import Manager
+from stango import Stango
from stango.files import Files
import functools
@@ -10,7 +10,7 @@
class ServerTestCase(StangoTestCase):
def setup(self):
- self.manager = Manager()
+ self.manager = Stango()
self.manager.index_file = 'index.html'
def serve(func):
View
4 tests/test_views.py
@@ -1,4 +1,4 @@
-from stango import Manager
+from stango import Stango
from stango.files import files_from_dir, files_from_tar
import os
@@ -16,7 +16,7 @@ def filelist(path):
class ViewsTestCase(StangoTestCase):
def setup(self):
self.tmp = self.tempdir()
- self.manager = Manager()
+ self.manager = Stango()
def test_static_file(self):
# stango.files.files_from_dir uses the stango.views.static_file view

0 comments on commit cbe52ad

Please sign in to comment.