Beispiel #1
0
 def test_input_dict(self):
     """
     Test what sort of information you get from input_dict
     when using a really basic environment.
     """
     r = Request(self.config, self.environ)
     self.assertEquals({}, r.input_dict())
Beispiel #2
0
 def test_query_string_dict(self):
     """
     Test parse of a query string.
     """
     self.environ['QUERY_STRING'] = "asdf=123&abd=def"
     r = Request(self.config, self.environ)
     self.assertEquals({"asdf":"123","abd":"def"}, r.input_dict())
Beispiel #3
0
    def __call__(self, env: EnvType,
                 start_response: StartRespType) -> BodyType:
        request = Request(env)

        response = self.handle_request(request)

        return response(env, start_response)