def test_matches_barcode(self): usps = package.USPSIMpb('420221539101026837331000039521') assert usps.matches_barcode == True
def test_not_matches_barcode(self): # Begins with '430' instead of '420' usps = package.USPSIMpb('430221539101026837331000039521') assert usps.matches_barcode == False
def test_is_valid_nine_digit_zip(self): usps = package.USPSIMpb('4209731792009205592767756015842558') assert usps.is_valid == True
def test_valid_checksum_zero_checksum(self): usps = package.USPSIMpb('9212391234567812345670') assert usps.valid_checksum == True
def test_is_valid_no_zip(self): usps = package.USPSIMpb('9212391234567812345670') assert usps.shipper == 'USPS'
def test_is_valid(self): usps = package.USPSIMpb('420221539101026837331000039521') assert usps.is_valid == True
def test_shipper(self): usps = package.USPSIMpb('420221539101026837331000039521') assert usps.shipper == 'USPS'
def test_tracking_number(self): usps = package.USPSIMpb('420221539101026837331000039521') assert usps.tracking_number == '9101026837331000039521'
def test_barcode_spaces(self): usps = package.USPSIMpb('420 22153 9101026837331000039521') assert usps.barcode == '420221539101026837331000039521'