Ejemplo n.º 1
0
 def test_is_eligible_tomorrow(self):
     # Will be eligible tomorrow
     TODAY = datetime.datetime(2000, 6, 1)
     citizen = Citizen(birth_date=datetime.date(1982, 6, 2))
     self.assertFalse(citizen.is_eligible(as_of=TODAY))
Ejemplo n.º 2
0
 def test_is_eligible_yesterday(self):
     # Became eligible yesterday
     TODAY = datetime.datetime(2000, 6, 2)
     citizen = Citizen(birth_date=datetime.date(1982, 6, 1))
     self.assertTrue(citizen.is_eligible(as_of=TODAY))
Ejemplo n.º 3
0
 def test_is_eligible_plenty_old(self):
     TODAY = datetime.datetime(2000, 1, 1)
     citizen = Citizen(birth_date=datetime.date(1970, 1, 1))
     self.assertTrue(citizen.is_eligible(as_of=TODAY))
Ejemplo n.º 4
0
 def test_is_eligible_today(self):
     # 18th birthday "today"
     TODAY = datetime.datetime(2000, 6, 1)
     citizen = Citizen(birth_date=datetime.date(1982, 6, 1))
     self.assertTrue(citizen.is_eligible(as_of=TODAY))
Ejemplo n.º 5
0
 def test_is_eligible_way_too_young(self):
     TODAY = datetime.datetime(2000, 1, 1)
     citizen = Citizen(birth_date=datetime.date(1990, 1, 1))
     self.assertFalse(citizen.is_eligible(as_of=TODAY))