Esempio n. 1
0
 def test_matches_barcode(self):
     ups = package.UPS('1Z999AA10123456784')
     assert ups.matches_barcode == True
Esempio n. 2
0
 def test_not_matches_barcode(self):
     # Begins with '1A' instead of '1Z'
     ups = package.UPS('1A999AA10123456784')
     assert ups.matches_barcode == False
Esempio n. 3
0
 def test_valid_checksum_zero_checksum(self):
     ups = package.UPS('1Z879E930346834440')
     assert ups.valid_checksum == True
Esempio n. 4
0
 def test_is_valid(self):
     ups = package.UPS('1Z999AA10123456784')
     assert ups.is_valid == True
Esempio n. 5
0
 def test_shipper(self):
     ups = package.UPS('1Z999AA10123456784')
     assert ups.shipper == 'UPS'
Esempio n. 6
0
 def test_tracking_number(self):
     ups = package.UPS('1Z999AA10123456784')
     assert ups.tracking_number == '1Z999AA10123456784'
Esempio n. 7
0
 def test_barcode_spaces(self):
     ups = package.UPS('1Z 999 AA 10123456784')
     assert ups.barcode == '1Z999AA10123456784'