diff options
author | Alfredo Deza <alfredodeza@gmail.com> | 2013-02-03 09:40:12 -0500 |
---|---|---|
committer | Alfredo Deza <alfredodeza@gmail.com> | 2013-02-03 09:40:12 -0500 |
commit | 7b370adcf51445aea2e985ea564045672a505170 (patch) | |
tree | 8021697795c83d5165aa21b1b23f6cb9032a3466 | |
parent | 2124e5e6cd3c2c4f077614c3334f956d1a86d4c4 (diff) | |
download | pecan-7b370adcf51445aea2e985ea564045672a505170.tar.gz |
add a test to demonstrate the problem
-rw-r--r-- | pecan/tests/test_base.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/pecan/tests/test_base.py b/pecan/tests/test_base.py index e31e577..b5f4029 100644 --- a/pecan/tests/test_base.py +++ b/pecan/tests/test_base.py @@ -725,6 +725,23 @@ class TestAbort(unittest.TestCase): assert r.status_int == 401 +class TestSriptName(unittest.TestCase): + + def setUp(self): + self.environ = {'SCRIPT_NAME': '/foo'} + + def test_handle_script_name(self): + class RootController(object): + @expose() + def index(self): + return 'Root Index' + + app = TestApp(Pecan(RootController()), extra_environ=self.environ) + r = app.get('/foo/') + assert r.status_int == 200 + + + class TestRedirect(unittest.TestCase): @property |