summaryrefslogtreecommitdiff
path: root/repoze/bfg/tests
diff options
context:
space:
mode:
Diffstat (limited to 'repoze/bfg/tests')
-rw-r--r--repoze/bfg/tests/test_view.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/repoze/bfg/tests/test_view.py b/repoze/bfg/tests/test_view.py
index a35930f69..3c7d6f853 100644
--- a/repoze/bfg/tests/test_view.py
+++ b/repoze/bfg/tests/test_view.py
@@ -351,7 +351,23 @@ class TestStaticView(unittest.TestCase, BaseTest):
def test_relpath_withpackage(self):
import os
path = 'fixtures'
- view = self._makeOne(path, package_name='another')
+ view = self._makeOne('another:fixtures')
+ context = DummyContext()
+ request = DummyRequest()
+ request.subpath = ['__init__.py']
+ request.environ = self._makeEnviron()
+ response = view(context, request)
+ self.assertEqual(request.copied, True)
+ here = os.path.abspath(os.path.dirname(__file__))
+ self.assertEqual(response.root_resource, 'fixtures')
+ self.assertEqual(response.resource_name, 'fixtures')
+ self.assertEqual(response.package_name, 'another')
+ self.assertEqual(response.cache_max_age, 3600)
+
+ def test_relpath_withpackage_name(self):
+ import os
+ path = 'fixtures'
+ view = self._makeOne('fixtures', package_name='another')
context = DummyContext()
request = DummyRequest()
request.subpath = ['__init__.py']