Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
johnjjung committed Oct 18, 2024
1 parent 5ed3ab2 commit 556a30f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/handler/test_http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def test_build_headers_default(self, http_client, patched_version_and_sys):
"X-Nylas-API-Wrapper": "python",
"User-Agent": "Nylas Python SDK 2.0.0 - 1.2.3",
"Authorization": "Bearer test-key",
"Accept-Encoding": "gzip",
}

def test_build_headers_extra_headers(self, http_client, patched_version_and_sys):
Expand All @@ -50,6 +51,7 @@ def test_build_headers_extra_headers(self, http_client, patched_version_and_sys)
"Authorization": "Bearer test-key",
"foo": "bar",
"X-Test": "test",
"Accept-Encoding": "gzip",
}

def test_build_headers_json_body(self, http_client, patched_version_and_sys):
Expand All @@ -64,6 +66,7 @@ def test_build_headers_json_body(self, http_client, patched_version_and_sys):
"User-Agent": "Nylas Python SDK 2.0.0 - 1.2.3",
"Authorization": "Bearer test-key",
"Content-type": "application/json",
"Accept-Encoding": "gzip",
}

def test_build_headers_form_body(self, http_client, patched_version_and_sys):
Expand All @@ -79,6 +82,7 @@ def test_build_headers_form_body(self, http_client, patched_version_and_sys):
"User-Agent": "Nylas Python SDK 2.0.0 - 1.2.3",
"Authorization": "Bearer test-key",
"Content-type": "application/x-www-form-urlencoded",
"Accept-Encoding": "gzip",
}

def test_build_headers_override_headers(self, http_client, patched_version_and_sys):
Expand All @@ -97,6 +101,7 @@ def test_build_headers_override_headers(self, http_client, patched_version_and_s
"Authorization": "Bearer test-key",
"foo": "bar",
"X-Test": "test",
"Accept-Encoding": "gzip",
}

def test_build_headers_override_api_key(self, http_client, patched_version_and_sys):
Expand All @@ -110,6 +115,7 @@ def test_build_headers_override_api_key(self, http_client, patched_version_and_s
"X-Nylas-API-Wrapper": "python",
"User-Agent": "Nylas Python SDK 2.0.0 - 1.2.3",
"Authorization": "Bearer test-key-override",
"Accept-Encoding": "gzip",
}

def test_build_request_default(self, http_client, patched_version_and_sys):
Expand All @@ -125,6 +131,7 @@ def test_build_request_default(self, http_client, patched_version_and_sys):
"X-Nylas-API-Wrapper": "python",
"User-Agent": "Nylas Python SDK 2.0.0 - 1.2.3",
"Authorization": "Bearer test-key",
"Accept-Encoding": "gzip",
},
}

Expand All @@ -144,6 +151,7 @@ def test_build_request_override_api_uri(self, http_client, patched_version_and_s
"X-Nylas-API-Wrapper": "python",
"User-Agent": "Nylas Python SDK 2.0.0 - 1.2.3",
"Authorization": "Bearer test-key",
"Accept-Encoding": "gzip",
},
}

Expand Down Expand Up @@ -201,6 +209,7 @@ def test_execute_download_request_override_timeout(
"User-Agent": "Nylas Python SDK 2.0.0 - 1.2.3",
"Authorization": "Bearer test-key",
"Content-type": "application/json",
"Accept-Encoding": "gzip",
},
timeout=60,
stream=False,
Expand Down Expand Up @@ -291,6 +300,7 @@ def test_execute(self, http_client, patched_version_and_sys, patched_request):
"User-Agent": "Nylas Python SDK 2.0.0 - 1.2.3",
"Authorization": "Bearer test-key",
"Content-type": "application/json",
"Accept-Encoding": "gzip",
"test": "header",
},
json={"foo": "bar"},
Expand Down Expand Up @@ -319,6 +329,7 @@ def test_execute_override_timeout(
"User-Agent": "Nylas Python SDK 2.0.0 - 1.2.3",
"Authorization": "Bearer test-key",
"Content-type": "application/json",
"Accept-Encoding": "gzip",
"test": "header",
},
json={"foo": "bar"},
Expand Down

0 comments on commit 556a30f

Please sign in to comment.