Esempio n. 1
0
    def test_get_members_string_empty(self):
        # Make a study group
        study_group = StudyGroup(
            name="banana",
            maxSize=4,
        )
        study_group.save()

        actual = study_group.get_members_string()
        expected = ''

        self.assertEqual(expected, actual)
Esempio n. 2
0
    def test_get_members_string_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_string()
        expected = 'Jim, Jim2'

        self.assertEqual(expected, actual)