def test_serial_less_than_date(self): # Case serial < date serial = '2111101111' date_str = '21111111' date = self.to_date(date_str) new_serial = SOA.calc_serial(serial, date) self.assertEqual(int(date_str + '00'), new_serial)
def test_serial_greater_than_date(self): # Case serial > date serial = '2111111111' date = self.to_date('21111011') new_serial = SOA.calc_serial(serial, date) self.assertEqual(int(serial) + 1, new_serial)
def test_serial_equal_date(self): # Case == serial = '2111111111' date = self.to_date('21111111') new_serial = SOA.calc_serial(serial, date) self.assertEqual(int(serial) + 1, new_serial)