def test_current_academic_year_calendar_update_wrong_user_type( self, user_role): profile = UserProfileFactory(user_role=user_role, school_unit=self.school_unit) self.client.login(username=profile.username, password='******') response = self.client.put(self.url, self.data) self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) profile.delete()
def test_parent_list_wrong_user_type(self, user_role): profile = UserProfileFactory( user_role=user_role, school_unit=self.school_unit if user_role != UserProfile.UserRoles.ADMINISTRATOR else None) self.client.login(username=profile.username, password='******') response = self.client.get(self.url) self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) profile.delete()