-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
skip tests when no credentials available
- Loading branch information
Showing
8 changed files
with
49 additions
and
4 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
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,39 @@ | ||
""" | ||
Test module for the Fedex Config Object. | ||
""" | ||
|
||
import unittest | ||
|
||
import sys | ||
|
||
sys.path.insert(0, '..') | ||
from fedex.config import FedexConfig | ||
|
||
|
||
|
||
|
||
class FedexConfigObjectTests(unittest.TestCase): | ||
""" | ||
These tests verify that the fedex config object is working properly. | ||
""" | ||
|
||
def test_fedex_config(self): | ||
# Need to pass at least key and password | ||
with self.assertRaises(TypeError): | ||
FedexConfig() | ||
|
||
# Test minimum set of credentials, key and password | ||
config = FedexConfig('key', 'password') | ||
assert config.key | ||
assert config.password | ||
|
||
# Test with all parameters, including overwrite wsdl path | ||
config = FedexConfig(key='', password='', account_number=None, meter_number=None, | ||
freight_account_number=None, | ||
integrator_id=None, wsdl_path='/wsdls', | ||
express_region_code=None, use_test_server=False) | ||
|
||
assert config.wsdl_path | ||
|
||
if __name__ == "__main__": | ||
unittest.main() |
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
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