コード例 #1
0
 def test_not_matches_barcode(self):
     # Begins with '72'
     usps = package.USPS20('72123456789123456787')
     assert usps.matches_barcode == False
コード例 #2
0
 def test_matches_barcode(self):
     usps = package.USPS20('71123456789123456787')
     assert usps.matches_barcode == True
コード例 #3
0
 def test_is_valid(self):
     usps = package.USPS20('71123456789123456787')
     assert usps.is_valid == True
コード例 #4
0
 def test_shipper(self):
     usps = package.USPS20('71123456789123456787')
     assert usps.shipper == 'USPS'
コード例 #5
0
 def test_tracking_number(self):
     usps = package.USPS20('71123456789123456787')
     assert usps.tracking_number == '71123456789123456787'
コード例 #6
0
 def test_barcode_spaces(self):
     usps = package.USPS20('7112 3456 7891 2345 6787')
     assert usps.barcode == '71123456789123456787'