def test_body(self):
        # Invalid: no content-type specified
        response = self.request('/body', body='{"hello": "world"}', method="PUT")
        self.assertEqual(response.headers["Content-Type"], "application/json; charset=UTF-8")
        self.assertTrue(b"JSON body expected" in response.body, msg="Unexpected body: %s" + response.body)

        response = self.request('/body', body='{"hello": "world"}', method="PUT", headers={"Content-Type": "application/json"})
        self.assertEqual(response.headers["Content-Type"], "application/json; charset=UTF-8")
        self.assertEqual(response.body, b'{"hello": "world"}')
dataset/ETHPy150Open dailymuse/oz/oz/json_api/tests/test_middleware.py/ApiMiddlewareTestCase.test_body/operator `%` -> `+`