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