Esempio n. 1
0
    def test_get_members_email_empty(self):
        # Make a study group

        study_group = StudyGroup(
            name="banana",
            maxSize=4,
        )
        study_group.save()

        actual = study_group.get_members_email()
        expected = ''

        self.assertEqual(expected, actual)
Esempio n. 2
0
    def test_get_members_email_not_empty(self):
        # Make a study group
        study_group = StudyGroup(
            name="banana",
            maxSize=4,
        )
        study_group.save()

        # Add Students to group
        study_group.members.add(self.student1)
        study_group.save()
        study_group.members.add(self.student2)
        study_group.save()

        actual = study_group.get_members_email()
        expected = 'Jim ([email protected]), Jim2 ([email protected])'

        self.assertEqual(expected, actual)