Esempio n. 1
0
 def get_forms(self, *args, **kwargs):
     groups = [
         directors(),
         trip_leader_trainers(),
         olcs(),
         directorate(),
         safety_leads(),
         graders()]
     return [GenericGroupForm(group, *args, prefix=str(group), **kwargs)
             for group in groups]
Esempio n. 2
0
    def mock_directorate(self):
        """
        Create a user with directorate permissions, and log the user in.
        """
        netid = 'directorate'
        email = netid + '@dartmouth.edu'
        self.directorate = get_user_model().objects.create_user(netid, netid, email)
        self.directorate.groups.add(directorate())
        self.directorate.save()

        return self.directorate