def test_Alive(self): indiv = Individual("I1") indiv.alive = True US03_check_birth_before_death_error(indiv) self.assertEqual(len(indiv.errors), 0) self.assertEqual(indiv.errors, [])
def setUp(self): self.indiv1 = Individual("I1") self.indiv2 = Individual("I2") self.indiv1.spouseFamilyObjects = [] self.indiv2.spouseFamilyObjects = [] self.individuals = [self.indiv1, self.indiv2]
def setUp(self): self.husband = Individual("I1") self.wife = Individual("I2") self.testFam1 = Family("F1") self.testFam1.husbandObject = self.husband self.testFam1.wifeObject = self.wife
def setUp(self): self.testChild1 = Individual("I1") #child self.testFam = Family("F1") #test family self.testFam.divorceDateObject = datetime(2019, 5, 3) #divorce date self.testFam.childrenObjects.append(self.testChild1) #added child
def setUp(self): self.indiv = Individual("I1") self.indiv.alive = False self.individuals = [self.indiv]
def setUp(self): self.indiv = Individual("I1") self.individuals = [self.indiv]
def setUp(self): self.husband = Individual("I1") self.wife = Individual("I2") self.testFam = Family("F1") self.families = [self.testFam]
def test_ValidBirthDate(self): indiv = Individual("I1") indiv.birthDateObject = datetime(1996, 9, 24) US01_check_date_before_today_error(indiv, "Birth") self.assertEqual(len(indiv.errors), 0) self.assertEqual(indiv.errors, [])
def test_InvalidDeathDate(self): indiv = Individual("I1") indiv.deathDateObject = datetime(2030, 9, 24) US01_check_date_before_today_error(indiv, "Death") self.assertEqual(len(indiv.errors), 1) self.assertEqual(indiv.errors[0], "Death date is after current date")
def setUp(self): self.husband = Individual("I1") self.child = Individual("I2") self.fam = Family("F1") self.fam.husbandObject = self.husband self.fam.childrenObjects.append(self.child) #added child