File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed
Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -75,9 +75,13 @@ def _check_response_for_request_errors(self):
7575 """
7676 if self .response .HighestSeverity == "ERROR" :
7777 for notification in self .response .Notifications :
78- if "Invalid tracking number" in notification .Message :
79- raise FedexInvalidTrackingNumber (notification .Code ,
80- notification .Message )
78+ if notification .Severity == "ERROR" :
79+ if "Invalid tracking number" in notification .Message :
80+ raise FedexInvalidTrackingNumber (notification .Code ,
81+ notification .Message )
82+ else :
83+ raise FedexError (notification .Code ,
84+ notification .Message )
8185
8286 def _assemble_and_send_request (self ):
8387 """
Original file line number Diff line number Diff line change @@ -17,10 +17,17 @@ def test_track(self):
1717 Test shipment tracking. Query for a tracking number and make sure the
1818 first (and hopefully only) result matches up.
1919 """
20- track_request = FedexTrackRequest (CONFIG_OBJ , '1777768882' )
20+ tracking_num = '1777768882'
21+ tracking_num = '799428562846'
22+ tracking_num = '111111111111'
23+ tracking_num = '012301230123'
24+
25+ track_request = FedexTrackRequest (CONFIG_OBJ , tracking_num )
2126 track_request .send_request ()
27+
28+ print track_request .response
2229
2330 for match in track_request .response .TrackDetails :
2431 # This should be the same tracking number on the response that we
2532 # asked for in the request.
26- self .assertEqual (match .TrackingNumber , '1777768882' )
33+ self .assertEqual (match .TrackingNumber , tracking_num )
You can’t perform that action at this time.
0 commit comments