Skip to content

Commit 8622dfe

Browse files
committed
add travis yml, increase test coverage
1 parent 1a4867d commit 8622dfe

File tree

8 files changed

+21
-4
lines changed

8 files changed

+21
-4
lines changed

.travis.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
language: python
2+
sudo: false
3+
python:
4+
- "2.7"
5+
- "3.5"
6+
7+
# command to install dependencies
8+
install:
9+
- pip install .
10+
- pip install -r requirements.txt
11+
12+
# command to run tests
13+
script: nosetests

CHANGES.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Change Log
88
* Added [Validation]AvailabilityAndCommitmentService_v4.wsdl for AVC service. (radzhome)
99
* Added examples and unit tests for AVC service.
1010
* Refactored examples and documentation. (radzhome)
11+
* A quick PEP8 pass using pycharm on most of the codebase (radzhome)
12+
* Add travis yml (radzhome)
1113

1214

1315
2.0.0

fedex/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,5 @@ def __init__(self, key, password, account_number=None, meter_number=None, freigh
7070
if wsdl_path is None:
7171
self.wsdl_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
7272
'wsdl')
73-
else:
73+
else: # pragma: no cover
7474
self.wsdl_path = wsdl_path

fedex/services/package_movement.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def _check_response_for_request_errors(self):
5757
this WSDL.
5858
"""
5959
if self.response.HighestSeverity == "ERROR":
60-
for notification in self.response.Notifications:
60+
for notification in self.response.Notifications: # pragma: no cover
6161
if notification.Severity == "ERROR":
6262
if "Postal Code Not Found" in notification.Message:
6363
raise FedexPostalCodeNotFound(notification.Code,

fedex/services/ship_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,6 @@ def _assemble_and_send_request(self):
210210
ClientDetail=self.ClientDetail,
211211
TransactionDetail=self.TransactionDetail,
212212
Version=self.VersionId,
213-
ShipTimestamp=datetime.now(),
213+
ShipTimestamp=datetime.datetime.now(),
214214
TrackingId=self.TrackingId,
215215
DeletionControl=self.DeletionControlType)

fedex/services/track_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def _check_response_for_request_errors(self):
8282
Checks the response to see if there were any errors specific to
8383
this WSDL.
8484
"""
85-
if self.response.HighestSeverity == "ERROR":
85+
if self.response.HighestSeverity == "ERROR": # pragma: no cover
8686
for notification in self.response.Notifications:
8787
if notification.Severity == "ERROR":
8888
if "Invalid tracking number" in notification.Message:

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
suds-jurko

tests/test_ship_service.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def test_create_delete_shipment(self):
6868
package1.Weight = package1_weight
6969
shipment.add_package(package1)
7070

71+
shipment.send_validation_request()
7172
shipment.send_request()
7273

7374
assert shipment.response

0 commit comments

Comments
 (0)