def get_rating_service(params): return RatingService( params.get("ups_license"), params.get("ups_user_name"), params.get("ups_password"), params.get("ups_mode"), # sandbox for testing purpose set as True for production set it to False )
def setUp(self): """Initialise a ShipmentConfirm and ShipmentAccept class each. """ logging.disable(logging.DEBUG) self.shipper_number = os.environ['UPS_SHIPPER_NO'] self.rating_api = RatingService( os.environ['UPS_LICENSE_NO'], os.environ['UPS_USER_ID'], os.environ['UPS_PASSWORD'], True # Test must be performed in sandbox anyway )