Skip to content

Commit

Permalink
Make the package compatible with zeep 4.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
TouwaStar committed Sep 18, 2023
1 parent 9d7bdb3 commit 6d9ac18
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 0 additions & 4 deletions netsuite/soap_api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,9 @@ def _generate_wsdl_url(self) -> str:
def _generate_cache(self) -> zeep.cache.Base:
return zeep.cache.SqliteCache(timeout=60 * 60 * 24 * 365)

def _generate_session(self) -> zeep.requests.Session:
return zeep.requests.Session()

def _generate_transport(self) -> zeep.transports.AsyncTransport:
return AsyncNetSuiteTransport(
self.wsdl_url,
session=self._generate_session(),
cache=self.cache,
)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ httpx = "~0.23"
pydantic = "~1"
orjson = {version = "~3", optional = true}
ipython = {version = "~8", optional = true, python = "^3.8"}
zeep = {version = "~4", optional = true, extras = ["async"]}
zeep = {version = "4.2.1", optional = true, extras = ["async"]}
oauthlib = "~3"

[tool.poetry.extras]
Expand Down
4 changes: 4 additions & 0 deletions tests/test_soap_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ def test_netsuite_wsdl_url(dummy_config):
soap_api.wsdl_url
== "https://123456-sb1.suitetalk.api.netsuite.com/wsdl/v2021_1_0/netsuite.wsdl"
)

def test_netsuite_transport_initialization(dummy_config):
soap_api = NetSuiteSoapApi(dummy_config)
soap_api._generate_transport()

0 comments on commit 6d9ac18

Please sign in to comment.