def mock_request_with_json(): r = HttpRequestImpl() r.method = 'POST' r.url = f"{MOCK_URL}?{MOCK_QUERY_STRING}" r.headers['Content-Type'] = 'Application/JSON' r.params['message'] = MOCK_JSON r.body = MOCK_JSON return r
def mock_request_with_json(): r = HttpRequestImpl() r.method = "POST" r.url = f"{MOCK_URL}?{MOCK_QUERY_STRING}" r.headers["Content-Type"] = "Application/JSON" r.params["message"] = MOCK_JSON r.body = MOCK_JSON return r
def test_body(): r = HttpRequestImpl() r.body = MOCK_JSON assert r.body == MOCK_JSON