Skip to content

Commit

Permalink
Make the package compatible with zeep 4.2.1 (#48)
Browse files Browse the repository at this point in the history
* Make the package compatible with zeep 4.2.1

* Accept 4.2.1 or higher

---------

Co-authored-by: Michael Bianco <iloveitaly@gmail.com>
  • Loading branch information
TouwaStar and iloveitaly authored Oct 19, 2023
1 parent 6fbe948 commit 846d668
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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
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 846d668

Please sign in to comment.