def test_add_spouse(self):
    self.assertEqual(self.ftree.add_spouse('Wife', 'Female', 'Zim'), constants.SPOUSE_ADDITION_FAILED)
    dummy_member = Member(1, 'DummyMember', 'Male')
    self.ftree.family_tree['DummyMember'] = dummy_member
    self.assertEqual(self.ftree.add_spouse('Wife', 'Female', 'Zim'), constants.PERSON_NOT_FOUND)
    spouse_a = Member(1, 'FakeMember', 'Female')
    spouse_b = Member(1, 'AlreadyMarriedMember', 'Male')
    spouse_b.set_spouse(spouse_a)
    spouse_c = Member(1, 'Zim', 'Male')
    self.ftree.family_tree['FakeMember'] = spouse_a
    self.ftree.family_tree['AlreadyMarriedMember'] = spouse_b
    self.ftree.family_tree['Zim'] = spouse_c
    self.assertEqual(self.ftree.add_spouse('Wife', 'Female', 'FakeMember'), constants.SPOUSE_ADDITION_FAILED)
    self.assertEqual(self.ftree.add_spouse('Wife', 'Female', 'AlreadyMarriedMember'), constants.SPOUSE_ADDITION_FAILED)
    self.assertEqual(self.ftree.add_spouse('Wife', 'Female', 'Zim'), constants.SPOUSE_ADDITION_SUCCEEDED)
    self.assertEqual(self.ftree.add_spouse('Wife', 'Female', 'Zim'), constants.SPOUSE_ADDITION_FAILED)
def test_add_spouse(self):
    self.assertEqual(self.ftree.add_spouse('Wife', 'Female', 'Zim'), constants.SPOUSE_ADDITION_FAILED)
    dummy_member = Member(1, 'DummyMember', 'Male')
    self.ftree.family_tree['DummyMember'] = dummy_member
    self.assertEqual(self.ftree.add_spouse('Wife', 'Female', 'Zim'), constants.PERSON_NOT_FOUND)
    spouse_a = Member(1, 'FakeMember', 'Female')
    spouse_b = Member(1, 'AlreadyMarriedMember', 'Male')
    spouse_b.set_spouse(spouse_a)
    spouse_c = Member(1, 'Zim', 'Male')
    self.ftree.family_tree['FakeMember'] = spouse_a
    self.ftree.family_tree['AlreadyMarriedMember'] = spouse_b
    self.ftree.family_tree['Zim'] = spouse_c
    self.assertEqual(self.ftree.add_spouse('Wife', 'Female', 'FakeMember'), constants.SPOUSE_ADDITION_FAILED)
    self.assertEqual(self.ftree.add_spouse('Wife', 'Female', 'AlreadyMarriedMember'), constants.SPOUSE_ADDITION_FAILED)
    self.assertEqual(self.ftree.add_spouse('Wife', 'Female', 'Zim'), constants.SPOUSE_ADDITION_SUCCEEDED)
    self.assertEqual(self.ftree.add_spouse('Wife', 'Female', 'Zim'), constants.SPOUSE_ADDITION_FAILED)