Пример #1
0
 def test_emptyPostPath(self):
     """
     If more path segments are consumed than remain in the request's
     I{postpath}, L{NevowSite.handleSegment} should silently not update
     I{prepath}.
     """
     request = FakeRequest(currentSegments=('',))
     context = RequestContext(tag=request)
     rootResource = Page()
     childResource = Page()
     site = NevowSite(rootResource)
     result = site.handleSegment(
         (childResource, ()), request, ('foo', 'bar'), context)
     self.assertEqual(request.prepath, [''])
     self.assertEqual(request.postpath, [])
Пример #2
0
 def test_emptyPostPath(self):
     """
     If more path segments are consumed than remain in the request's
     I{postpath}, L{NevowSite.handleSegment} should silently not update
     I{prepath}.
     """
     request = FakeRequest(currentSegments=('', ))
     context = RequestContext(tag=request)
     rootResource = Page()
     childResource = Page()
     site = NevowSite(rootResource)
     result = site.handleSegment((childResource, ()), request,
                                 ('foo', 'bar'), context)
     self.assertEqual(request.prepath, [''])
     self.assertEqual(request.postpath, [])