change varaible name: response content => response body

This commit is contained in:
httprunner
2017-06-21 16:03:12 +08:00
parent 5e03acba5f
commit 908a2e522a
2 changed files with 7 additions and 7 deletions

View File

@@ -38,10 +38,10 @@ class TestUtils(ApiServerUnittest):
parse_result = utils.parse_response_object(resp_obj)
self.assertIn('status_code', parse_result)
self.assertIn('headers', parse_result)
self.assertIn('content', parse_result)
self.assertIn('body', parse_result)
self.assertIn('Content-Type', parse_result['headers'])
self.assertIn('Content-Length', parse_result['headers'])
self.assertIn('success', parse_result['content'])
self.assertIn('success', parse_result['body'])
def test_parse_response_object_text(self):
url = "http://127.0.0.1:5000/"
@@ -49,10 +49,10 @@ class TestUtils(ApiServerUnittest):
parse_result = utils.parse_response_object(resp_obj)
self.assertIn('status_code', parse_result)
self.assertIn('headers', parse_result)
self.assertIn('content', parse_result)
self.assertIn('body', parse_result)
self.assertIn('Content-Type', parse_result['headers'])
self.assertIn('Content-Length', parse_result['headers'])
self.assertTrue(str, type(parse_result['content']))
self.assertTrue(str, type(parse_result['body']))
def test_diff_response_status_code_equal(self):
status_code = random.randint(200, 511)