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 mock_request(): r = HttpRequestImpl() r.method = "GET" r.url = MOCK_URL return r
def test_url(): r = HttpRequestImpl() r.url = MOCK_URL assert r.url == MOCK_URL