From 156375861f191f51f4e97ce25cd4d39f8025f90b Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 27 May 2009 15:47:11 +0000 Subject: - A paster command has been added named "bfgshell". This command can be used to get an interactive prompt with your BFG root object in the global namespace. E.g.:: bin/paster bfgshell /path/to/myapp.ini myapp See the ``Project`` chapter in the BFG documentation for more information. --- repoze/bfg/tests/test_scripting.py | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 repoze/bfg/tests/test_scripting.py (limited to 'repoze/bfg/tests/test_scripting.py') diff --git a/repoze/bfg/tests/test_scripting.py b/repoze/bfg/tests/test_scripting.py deleted file mode 100644 index a54b4b7d9..000000000 --- a/repoze/bfg/tests/test_scripting.py +++ /dev/null @@ -1,31 +0,0 @@ -import unittest - -class TestGetRoot(unittest.TestCase): - def _callFUT(self, router): - from repoze.bfg.scripting import get_root - return get_root(router) - - def test_it(self): - router = DummyRouter() - result = self._callFUT(router) - self.assertEqual(result, router) - self.assertEqual(len(router.threadlocal_manager.pushed), 1) - self.assertEqual(router.threadlocal_manager.pushed[0], - {'registry':None, 'request':None}) - - -class DummyThreadLocalManager: - def __init__(self): - self.pushed = [] - - def push(self, val): - self.pushed.append(val) - -class DummyRouter: - def __init__(self): - self.registry = None - self.threadlocal_manager = DummyThreadLocalManager() - - def root_factory(self, environ): - return self - -- cgit v1.2.3