diff --git a/stock.py b/stock.py index be2830fd4f..0d2f17ad7f 100644 --- a/stock.py +++ b/stock.py @@ -230,7 +230,7 @@ class CreateShippingUPS(Wizard): 'AddressLine': [l[:35] for l in (address.street or '').splitlines()[:3]], 'City': address.city[:30], - 'PostalCode': (address.zip or '')[:9], + 'PostalCode': (address.zip or '').replace(' ', '')[:9], 'CountryCode': address.country.code if address.country else '', }, } diff --git a/tests/scenario_shipping_ups.rst b/tests/scenario_shipping_ups.rst index 1f396118a0..3cf0b7c5d3 100644 --- a/tests/scenario_shipping_ups.rst +++ b/tests/scenario_shipping_ups.rst @@ -59,7 +59,7 @@ Create parties:: >>> customer.save() >>> customer_address = customer.addresses.new() >>> customer_address.street = 'Anfield Road' - >>> customer_address.zip = 'L40TH' + >>> customer_address.zip = 'L 40TH' >>> customer_address.city = 'Liverpool' >>> customer_address.country = britain >>> customer_address.save()