def test_arrangement_can_add_participant_to_group(self): participant = compat.Participant('eric') group = compat.Group() group2 = compat.Group() self.arrangement.addParticipantToGroup(participant, group) self.assertIs(group.participants[0], participant) self.assertIs(participant.group, group)
def test_group_can_remove_participant(self): self.group = compat.Group() self.group.addParticipant(self.participant1) self.assertEqual(len(self.group.participants), 1) self.group.removeParticipant(self.participant1) self.assertEqual(len(self.group.participants), 0)
def setUp(self): self.group = compat.Group() self.participant1 = compat.Participant('eric') self.participant2 = compat.Participant('john')
def test_participant_can_be_removed_from_group(self): group = compat.Group() self.participant.addToGroup(group) self.assertEqual(group, self.participant.group) self.participant.removeFromGroup() self.assertEqual(self.participant.group, None)
def test_participant_can_be_added_to_group(self): group = compat.Group() self.participant.addToGroup(group) self.assertIs(self.participant.group, group)