-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix failing tests and add basic REST API and Restlet tests
- Loading branch information
1 parent
4f94345
commit af780cf
Showing
7 changed files
with
59 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import pytest | ||
|
||
from netsuite import Config | ||
|
||
|
||
@pytest.fixture | ||
def dummy_config(): | ||
return Config( | ||
account="123456_SB1", | ||
auth={ | ||
"consumer_key": "abcdefghijklmnopqrstuvwxyz0123456789", | ||
"consumer_secret": "abcdefghijklmnopqrstuvwxyz0123456789", | ||
"token_id": "abcdefghijklmnopqrstuvwxyz0123456789", | ||
"token_secret": "abcdefghijklmnopqrstuvwxyz0123456789", | ||
}, | ||
) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from netsuite import NetSuiteRestApi | ||
|
||
|
||
def test_expected_hostname(dummy_config): | ||
rest_api = NetSuiteRestApi(dummy_config) | ||
assert rest_api.hostname == "123456-sb1.suitetalk.api.netsuite.com" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from netsuite import NetSuiteRestlet | ||
|
||
|
||
def test_expected_hostname(dummy_config): | ||
restlet = NetSuiteRestlet(dummy_config) | ||
assert restlet.hostname == "123456-sb1.restlets.api.netsuite.com" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import pytest | ||
|
||
from netsuite import NetSuiteSoapApi | ||
from netsuite.soap_api.zeep import ZEEP_INSTALLED | ||
|
||
pytestmark = pytest.mark.skipif(not ZEEP_INSTALLED, reason="Requires zeep") | ||
|
||
|
||
def test_netsuite_hostname(dummy_config): | ||
soap_api = NetSuiteSoapApi(dummy_config) | ||
assert soap_api.hostname == "123456-sb1.suitetalk.api.netsuite.com" | ||
|
||
|
||
def test_netsuite_wsdl_url(dummy_config): | ||
soap_api = NetSuiteSoapApi(dummy_config) | ||
assert ( | ||
soap_api.wsdl_url | ||
== "https://123456-sb1.suitetalk.api.netsuite.com/wsdl/v2021_1_0/netsuite.wsdl" | ||
) |