Exemple #1
0
 def test_deferredURLOverlayParam(self):
     D = self.renderResource(url.here.child(util.succeed('child')).add('foo',util.succeed('bar')))
     def after(xxx_todo_changeme3):
         (html, redirected_to) = xxx_todo_changeme3
         self.assertIn("http://localhost/child?foo=bar", html)
         self.assertEqual("http://localhost/child?foo=bar", redirected_to)
     return D.addCallback(after)
 def test_deferredURLParam(self):
     D = self.renderResource(
         url.URL.fromString("http://localhost/")
         .child(util.succeed('child')).add('foo',util.succeed('bar'))
         )
     def after((html, redirected_to)):
         self.assertIn("http://localhost/child?foo=bar", html)
         self.assertEquals("http://localhost/child?foo=bar", redirected_to)
     return D.addCallback(after)
Exemple #3
0
    def test_deferredURLOverlayParam(self):
        D = self.renderResource(url.here.child(util.succeed("child")).add("foo", util.succeed("bar")))

        def after(xxx_todo_changeme3):
            (html, redirected_to) = xxx_todo_changeme3
            self.assertIn("http://localhost/child?foo=bar", html)
            self.assertEqual("http://localhost/child?foo=bar", redirected_to)

        return D.addCallback(after)
Exemple #4
0
 def renderHTTP(self, context):
     return util.succeed("hello")
Exemple #5
0
 def locateChild(self, context, segs):
     d = util.succeed((self, segs[1:]))
     return d
Exemple #6
0
 def locateChild(self, context, segs):
     d = util.succeed((self, segs[1:]))
     return d
Exemple #7
0
 def renderHTTP(self, context):
     return util.succeed("hello")
Exemple #8
0
 def locateConfigurable(self, *args, **kw):
     r = iformless.IConfigurable(self.conf)
     if not self.synchronousLocateConfigurable:
         r = util.succeed(r)
     return r
Exemple #9
0
 def renderHTTP(self, request):
     return util.succeed("hello")
Exemple #10
0
 def locateChild(self, request, segs):
     d = util.succeed((self, segs[1:]))
     return d
Exemple #11
0
 def renderHTTP(self, request):
     return util.succeed("hello")
Exemple #12
0
 def locateChild(self, request, segs):
     d = util.succeed((self, segs[1:]))
     return d
Exemple #13
0
 def locateConfigurable(self, *args, **kw):
     r = iformless.IConfigurable(self.conf)
     if not self.synchronousLocateConfigurable:
         r = util.succeed(r)
     return r