diff --git a/netsuite/soap_api/client.py b/netsuite/soap_api/client.py index 97db3f7..6dfda17 100644 --- a/netsuite/soap_api/client.py +++ b/netsuite/soap_api/client.py @@ -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, ) diff --git a/pyproject.toml b/pyproject.toml index 12b665c..f7819b4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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] diff --git a/tests/test_soap_api.py b/tests/test_soap_api.py index 710aed1..6bbc2ac 100644 --- a/tests/test_soap_api.py +++ b/tests/test_soap_api.py @@ -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()