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