Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the package compatible with zeep 4.2.1 #48

Merged
merged 3 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do we lose removing this?

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()
Loading