예제 #1
0
 def test_check_authorized_type(self):
     education_group = EducationGroupYearFactory()
     AuthorizedRelationshipFactory(
         parent_type=education_group.education_group_type)
     result = check_authorized_type(education_group)
     self.assertTrue(result)
예제 #2
0
 def test_check_authorized_type_without_parent(self):
     result = check_authorized_type(None)
     self.assertTrue(result)
예제 #3
0
 def test_check_unauthorized_type(self):
     education_group = EducationGroupYearFactory()
     result = check_authorized_type(education_group)
     self.assertFalse(result)