예제 #1
0
 def test_matches_barcode(self):
     ontrac = package.OnTrac('D10010945303074')
     assert ontrac.matches_barcode == True
예제 #2
0
 def test_not_matches_barcode(self):
     # Begins with '2' instead of 'C'
     ontrac = package.OnTrac('211235523929147')
     assert ontrac.matches_barcode == False
예제 #3
0
 def test_valid_checksum_zero_checksum(self):
     ontrac = package.OnTrac('C11235523929840')
     assert ontrac.valid_checksum == True
예제 #4
0
 def test_is_valid(self):
     ontrac = package.OnTrac('C11235523929147')
     assert ontrac.is_valid == True
예제 #5
0
 def test_shipper(self):
     ontrac = package.OnTrac('C11235523929147')
     assert ontrac.shipper == 'OnTrac'
예제 #6
0
 def test_tracking_number(self):
     ontrac = package.OnTrac('C11235523929147')
     assert ontrac.tracking_number == 'C11235523929147'
예제 #7
0
 def test_barcode_spaces(self):
     ontrac = package.OnTrac('C 11235523929147')
     assert ontrac.barcode == 'C11235523929147'