def test_flash(self): self.request = request.Request(url=URL(path=b"/")) self.assertEqual(self.request.messages, []) self.request.flash(b"Hello World") self.assertEqual( self.request.messages, [request._Message(content=b"Hello World")], )
def test_url(self): self.request = request.Request(url=URL(path=[u"foo", u"bar"])) self.assertEqual(self.request.url, URL(path=[u"foo", u"bar"]))
def make_request(self, headers): return request.Request(url=URL(path=[u""]), headers=headers)
def test_url(self): self.request = request.Request(url=URL(path=b"/foo/bar")) self.assertEqual(self.request.url, URL(path=b"/foo/bar"))