Exemplo n.º 1
0
 def test_make_response_body_with_ext(self):
     self.expected.update(self.ext)
     self.assertEqual(
         Problem.make_response_body(self.status,
                                    self.title,
                                    self.detail,
                                    ext=self.ext),
         json.dumps(self.expected))
Exemplo n.º 2
0
 def test_make_response_body_with_instance(self):
     self.expected['instance'] = self.instance
     self.assertEqual(
         Problem.make_response_body(self.status,
                                    self.title,
                                    self.detail,
                                    instance=self.instance),
         json.dumps(self.expected))
Exemplo n.º 3
0
 def test_make_response_body_with_type(self):
     status = 404
     self.expected['type'] = self.type_
     self.expected['status'] = status
     self.assertEqual(
         Problem.make_response_body(status,
                                    self.title,
                                    self.detail,
                                    type_=self.type_),
         json.dumps(self.expected))
Exemplo n.º 4
0
 def test_make_response_body(self):
     self.assertEqual(
         Problem.make_response_body(self.status, self.title, self.detail),
         json.dumps(self.expected))
Exemplo n.º 5
0
 def test_make_response_body_with_ext(self):
     self.expected.update(self.ext)
     self.assertEqual(
         Problem.make_response_body(self.status, self.title, self.detail, ext=self.ext),
         json.dumps(self.expected))
Exemplo n.º 6
0
 def test_make_response_body_with_type(self):
     status = 404
     self.expected['type'] = self.type_
     self.expected['status'] = status
     self.assertEqual(
         Problem.make_response_body(status, self.title, self.detail, type_=self.type_), json.dumps(self.expected))
Exemplo n.º 7
0
 def test_make_response_body_with_instance(self):
     self.expected['instance'] = self.instance
     self.assertEqual(
         Problem.make_response_body(self.status, self.title, self.detail, instance=self.instance),
         json.dumps(self.expected))
Exemplo n.º 8
0
 def test_make_response_body(self):
     self.assertEqual(Problem.make_response_body(self.status, self.title, self.detail), json.dumps(self.expected))