示例#1
0
    def test_is_sic_eligible(self):
        sic_manager = SICFactory()

        for education_group_year in [self.common_bachelor, self.training]:
            perm = GeneralInformationPerms(sic_manager.user,
                                           education_group_year)
            self.assertTrue(perm._is_sic_eligible())
示例#2
0
    def test_is_eligible_case_user_is_sic(self, mock_is_sic_eligible, mock_user_have_perm, mock_super_is_eligible):
        sic = SICFactory()
        perm = AdmissionConditionPerms(sic.user, self.common_bachelor)
        perm._is_eligible()

        self.assertTrue(mock_super_is_eligible.called)
        self.assertTrue(mock_is_sic_eligible.called)
示例#3
0
    def test_is_sic(self):
        a_person = PersonFactory()
        self.assertFalse(a_person.is_sic)

        a_person = SICFactory()
        self.assertTrue(a_person.is_sic)