Ejemplo n.º 1
0
 def setUp(self):
     """
     Create a resource and a wrapper to test.
     """
     self.store = Store()
     self.urlGenerator = SiteConfiguration(store=self.store,
                                           hostname=u"example.com")
     self.child = StubResource(None, None, None)
     self.childSegments = ("baz", "quux")
     self.content = "some bytes perhaps"
     self.resource = StubResource(self.child, self.childSegments,
                                  self.content)
     self.wrapper = SecuringWrapper(self.urlGenerator, self.resource)