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)
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 renderHTTP(self, context): return util.succeed("hello")
def locateChild(self, context, segs): d = util.succeed((self, segs[1:])) return d
def locateConfigurable(self, *args, **kw): r = iformless.IConfigurable(self.conf) if not self.synchronousLocateConfigurable: r = util.succeed(r) return r
def renderHTTP(self, request): return util.succeed("hello")
def locateChild(self, request, segs): d = util.succeed((self, segs[1:])) return d