def test_valid_model(self): m = AddrObj(startdate=yesterday, enddate=tomorrow) self.assertTrue(common_validator(m, today=today))
def test_both_today(self): m = AddrObj(startdate=today, enddate=today) self.assertFalse(common_validator(m, today=today))
def test_startdate_tomorrow(self): m = AddrObj(startdate=tomorrow, enddate=tomorrow) self.assertFalse(common_validator(m, today=today))