Ejemplo n.º 1
0
    def setUp(self):
        self.user = models.new_user(username='******', password='******')
        self.user2 = models.new_user(username='******', password='******')
        self.school = models.new_school(user=self.user)
        self.school2 = models.new_school(user=self.user2)

        self.assignment1 = models.new_assignment(school=self.school)
        self.assignment2 = models.new_assignment(school=self.school)
        self.assignment3 = models.new_assignment(school=self.school2)
        self.new_assignment = models.new_assignment(school=self.school)
        self.faulty_assignment = models.new_assignment()

        self.delegate1 = models.new_delegate(
            name="Nathaniel Parke",
            school=self.school,
            assignment=self.assignment1
        )

        self.delegate2 = models.new_delegate(
            name='Trevor Dowds',
            school=self.school,
            assignment=self.assignment2
        )

        self.delegate3 = models.new_delegate(
            name='Kunal Mehta',
            school=self.school2,
            assignment=self.assignment3
        )

        self.params = [
            {'id': self.delegate1.id, 'assignment': self.new_assignment.id},
            {'id': self.delegate2.id, 'assignment': None}
        ]
Ejemplo n.º 2
0
    def setUp(self):
        self.user = models.new_user(username='******', password='******')
        self.user2 = models.new_user(username='******', password='******')
        self.school = models.new_school(user=self.user)
        self.school2 = models.new_school(user=self.user2)

        self.assignment1 = models.new_assignment(school=self.school)
        self.assignment2 = models.new_assignment(school=self.school)
        self.assignment3 = models.new_assignment(school=self.school2)
        self.new_assignment = models.new_assignment(school=self.school)
        self.faulty_assignment = models.new_assignment()

        self.delegate1 = models.new_delegate(name="Nathaniel Parke",
                                             school=self.school,
                                             assignment=self.assignment1)

        self.delegate2 = models.new_delegate(name='Trevor Dowds',
                                             school=self.school,
                                             assignment=self.assignment2)

        self.delegate3 = models.new_delegate(name='Kunal Mehta',
                                             school=self.school2,
                                             assignment=self.assignment3)

        self.params = [{
            'id': self.delegate1.id,
            'assignment': self.new_assignment.id
        }, {
            'id': self.delegate2.id,
            'assignment': None
        }]
Ejemplo n.º 3
0
 def setUp(self):
     self.user = models.new_user(username='******', password='******')
     self.school = models.new_school(user=self.user)
     self.assignment1 = models.new_assignment(school=self.school)
     self.assignment2 = models.new_assignment(school=self.school)
     self.delegate1 = models.new_delegate(assignment=self.assignment1, )
     self.delegate2 = models.new_delegate(assignment=self.assignment2,
                                          name='Trevor Dowds',
                                          email='*****@*****.**',
                                          summary='Good!')
Ejemplo n.º 4
0
 def setUp(self):
     self.user = models.new_user(username='******', password='******')
     self.school = models.new_school(user=self.user)
     self.assignment1 = models.new_assignment(school=self.school)
     self.assignment2 = models.new_assignment(school=self.school)
     self.delegate1 = models.new_delegate(
         assignment=self.assignment1,
     )
     self.delegate2 = models.new_delegate(
         assignment=self.assignment2,
         name='Trevor Dowds',
         email='*****@*****.**',
         summary='Good!'
     )
Ejemplo n.º 5
0
 def setUp(self):
     self.user = models.new_user(username='******', password='******')
     self.school = models.new_school(user=self.user)
     self.assignment = models.new_assignment(school=self.school)
     self.delegate = models.new_delegate(assignment=self.assignment,
                                         school=self.school)
     self.params['assignment'] = self.assignment.id
Ejemplo n.º 6
0
 def setUp(self):
     self.advisor = models.new_user(username='******', password='******')
     self.chair = models.new_user(
         username='******', password='******', user_type=User.TYPE_CHAIR)
     self.delegate_user = models.new_user(
         username='******',
         password='******',
         user_type=User.TYPE_DELEGATE)
     self.school = models.new_school(user=self.advisor)
     self.registration = models.new_registration(school=self.school)
     self.committee = models.new_committee(user=self.chair)
     self.a1 = models.new_assignment(
         registration=self.registration, committee=self.committee)
     self.a2 = models.new_assignment(
         registration=self.registration, committee=self.committee)
     self.a3 = models.new_assignment()
Ejemplo n.º 7
0
 def setUp(self):
     self.advisor = models.new_user(username='******', password='******')
     self.chair = models.new_user(
         username='******', password='******', user_type=User.TYPE_CHAIR)
     self.delegate_user = models.new_user(
         username='******',
         password='******',
         user_type=User.TYPE_DELEGATE)
     self.delegate_user_2 = models.new_user(
         username='******',
         password='******',
         user_type=User.TYPE_DELEGATE)
     self.school = models.new_school(user=self.advisor)
     self.registration = models.new_registration(school=self.school)
     self.rubric = models.new_rubric()
     self.committee = models.new_committee(
         user=self.chair, rubric=self.rubric)
     self.paper = models.new_position_paper()
     self.assignment = models.new_assignment(
         registration=self.registration,
         committee=self.committee,
         paper=self.paper)
     self.delegate = models.new_delegate(
         user=self.delegate_user,
         assignment=self.assignment,
         school=self.school)
Ejemplo n.º 8
0
 def setUp(self):
     self.user = models.new_user(username='******', password='******')
     self.school = models.new_school(user=self.user)
     self.user2 = models.new_user(username='******', password='******')
     self.school2 = models.new_school(user=self.user2)
     self.assignment = models.new_assignment(school=self.school)
     self.params['assignment'] = self.assignment.id
     self.params['school'] = self.school.id
Ejemplo n.º 9
0
 def setUp(self):
     self.user = models.new_user(username='******', password='******')
     self.school = models.new_school(user=self.user)
     self.user2 = models.new_user(username='******', password='******')
     self.school2 = models.new_school(user=self.user2)
     self.assignment = models.new_assignment(school=self.school)
     self.params['assignment'] = self.assignment.id
     self.params['school'] = self.school.id
Ejemplo n.º 10
0
 def setUp(self):
     self.committee_1 = models.new_committee(name='UNSC')
     self.feedback_1 = models.new_committee_feedback(
         committee=self.committee_1, comment='Good')
     self.committee_2 = models.new_committee(name='HSC')
     self.feedback_2 = models.new_committee_feedback(
         committee=self.committee_2, comment='Not Good')
     self.assignment_1 = models.new_assignment(committee=self.committee_1)
Ejemplo n.º 11
0
 def setUp(self):
     self.committee_1 = models.new_committee(name='CYBER')
     self.committee_2 = models.new_committee(name='UNPBC')
     self.assignment = models.new_assignment(committee=self.committee_1)
     self.delegate = models.new_delegate(assignment=self.assignment)
     self.params = {
         'comment': "I never got called on ever. SAD!",
         'committee': self.committee_1.id
     }
Ejemplo n.º 12
0
 def setUp(self):
     self.committee_1 = models.new_committee(name='DISC')
     self.committee_2 = models.new_committee(name='SOCHUM')
     self.feedback_1 = models.new_committee_feedback(
         committee=self.committee_1, comment='Good')
     self.feedback_2 = models.new_committee_feedback(
         committee=self.committee_1, comment="Not so good")
     self.feedback_3 = models.new_committee_feedback(
         committee=self.committee_2, comment="Awful")
     self.assignment_1 = models.new_assignment(committee=self.committee_1)
Ejemplo n.º 13
0
    def test_delegate(self):
        a = models.new_assignment(paper=self.object)

        delegate_user = models.new_user(user_type=User.TYPE_DELEGATE)
        self.as_user(delegate_user).do_test(
            expected_error=auto.EXP_PERMISSION_DENIED)

        delegate = models.new_delegate(
            assignment=a, school=a.registration.school, user=delegate_user)
        self.as_user(delegate_user).do_test()
Ejemplo n.º 14
0
 def setUp(self):
     self.committee_1 = models.new_committee(name='CYBER')
     self.committee_2 = models.new_committee(name='UNPBC')
     self.assignment_1 = models.new_assignment(committee=self.committee_1)
     self.assignment_2 = models.new_assignment(committee=self.committee_2)
     self.delegate_1 = models.new_delegate(assignment=self.assignment_1)
     self.delegate_2 = models.new_delegate(assignment=self.assignment_2)
     self.params = {
         'comment': "I never got called on ever. SAD!",
         'committee': self.committee_1.id,
         'rating': 4,
         'chair_1_name': "Jake Tibbetts",
         'chair_1_comment': "He was the head chair",
         'chair_1_rating': 10,
         'chair_2_name': "Trent",
         'chair_2_comment': "He was the funny one",
         'chair_2_rating': 3,
         'chair_3_name': "Suchi",
         'chair_3_comment': "She was the cute one",
         'chair_3_rating': 8,
         'chair_4_name': "Nikhil",
         'chair_4_comment': "He was the baby",
         'chair_4_rating': 1,
         'chair_5_name': "",
         'chair_5_comment': "",
         'chair_5_rating': 0,
         'chair_6_name': "",
         'chair_6_comment': "",
         'chair_6_rating': 0,
         'chair_7_name': "",
         'chair_7_comment': "",
         'chair_7_rating': 0,
         'chair_8_name': "",
         'chair_8_comment': "",
         'chair_8_rating': 0,
         'chair_9_name': "",
         'chair_9_comment': "",
         'chair_9_rating': 0,
         'chair_10_name': "",
         'chair_10_comment': "",
         'chair_10_rating': 0
     }
Ejemplo n.º 15
0
 def setUp(self):
     self.advisor = models.new_user(username='******', password='******')
     self.chair = models.new_user(username='******',
                                  password='******',
                                  user_type=User.TYPE_CHAIR)
     self.delegate_user = models.new_user(username='******',
                                          password='******',
                                          user_type=User.TYPE_DELEGATE)
     self.school = models.new_school(user=self.advisor)
     self.registration = models.new_registration(school=self.school)
     self.committee = models.new_committee(user=self.chair)
     self.assignment1 = models.new_assignment(
         registration=self.registration, committee=self.committee)
     self.assignment2 = models.new_assignment(
         registration=self.registration)
     self.delegate1 = models.new_delegate(assignment=self.assignment1, )
     self.delegate2 = models.new_delegate(assignment=self.assignment2,
                                          name='Trevor Dowds',
                                          email='*****@*****.**',
                                          summary='Good!')
Ejemplo n.º 16
0
    def test_delegate(self):
        a = models.new_assignment(paper=self.object)

        delegate_user = models.new_user(user_type=User.TYPE_DELEGATE)
        self.as_user(delegate_user).do_test(
            expected_error=auto.EXP_PERMISSION_DENIED)

        delegate = models.new_delegate(assignment=a,
                                       school=a.registration.school,
                                       user=delegate_user)
        self.as_user(delegate_user).do_test()
Ejemplo n.º 17
0
 def setUp(self):
     self.advisor = models.new_user(username='******', password='******')
     self.chair = models.new_user(
         username='******', password='******', user_type=User.TYPE_CHAIR)
     self.delegate_user = models.new_user(
         username='******',
         password='******',
         user_type=User.TYPE_DELEGATE)
     self.school = models.new_school(user=self.advisor)
     self.registration = models.new_registration(school=self.school)
     self.committee = models.new_committee(user=self.chair)
     self.assignment1 = models.new_assignment(
         registration=self.registration, committee=self.committee)
     self.assignment2 = models.new_assignment(
         registration=self.registration)
     self.delegate1 = models.new_delegate(assignment=self.assignment1, )
     self.delegate2 = models.new_delegate(
         assignment=self.assignment2,
         name='Trevor Dowds',
         email='*****@*****.**',
         summary='Good!')
Ejemplo n.º 18
0
 def setUp(self):
     self.advisor = models.new_user(username='******', password='******')
     self.school = models.new_school(user=self.advisor)
     self.registration = models.new_registration(school=self.school)
     self.assignment = models.new_assignment(registration=self.registration)
     self.delegate = models.new_delegate(
         school=self.school, assignment=self.assignment)
     self.delegate.assignment = None
     self.delegate.save()
     self.superuser = models.new_user(is_superuser=True)
     self.params = {'email': '*****@*****.**'}
     self.assign_params = {'assignment': self.assignment.id}
     self.unassign_params = {'assignment': None}
Ejemplo n.º 19
0
    def test_save(self):
        """
        A delegate's school field and a delegate's assignment's school field
        should be the same if they both exist on the delegate.
        """
        school = models.new_school(name='S1')
        assignment = models.new_assignment()

        self.assertRaises(ValidationError, Delegate.objects.create,
            name="Test Delegate",
            school=school,
            assignment=assignment
        )
Ejemplo n.º 20
0
 def setUp(self):
     self.advisor = models.new_user(username='******', password='******')
     self.school = models.new_school(user=self.advisor)
     self.registration = models.new_registration(school=self.school)
     self.assignment = models.new_assignment(registration=self.registration)
     self.delegate = models.new_delegate(
         school=self.school, assignment=self.assignment)
     self.delegate.assignment = None
     self.delegate.save()
     self.superuser = models.new_user(is_superuser=True)
     self.delegate_user = models.new_user(
         username='******',
         delegate=self.delegate,
         user_type=User.TYPE_DELEGATE)
Ejemplo n.º 21
0
    def test_save(self):
        """
        A delegate's school field and a delegate's assignment's school field
        should be the same if they both exist on the delegate.
        """
        school = models.new_school(name='S1')
        registration = models.new_registration()
        assignment = models.new_assignment(registration=registration)

        self.assertRaises(
            ValidationError,
            Delegate.objects.create,
            name="Test Delegate",
            school=school,
            assignment=assignment)
Ejemplo n.º 22
0
 def test_delegate(self):
     '''Tests delegate can get secretariat information'''
     self.assignment = models.new_assignment()
     self.user = models.new_user(
         username='******',
         password='******',
         user_type=User.TYPE_DELEGATE,
         assignment=self.assignment, )
     self.client.login(username='******', password='******')
     response = self.get_response(self.sm1.id)
     response.data.pop('id')
     self.assertEqual(response.data, {
         'name': self.name,
         'committee': self.committee.id,
         'is_head_chair': self.is_head_chair
     })
Ejemplo n.º 23
0
    def test_update_assignment(self):
        '''Tests that when an assignment changes schools, its rejected
           field is set to False and any delegates assigned to it are
           no longer assigned to it.'''
        s1 = models.new_school(name='S1')
        s2 = models.new_school(name='S2')
        a = models.new_assignment(school=s1, rejected=True)
        d1 = models.new_delegate(school=s1, assignment=a)
        d2 = models.new_delegate(school=s1, assignment=a)
        self.assertEquals(a.delegates.count(), 2)
        self.assertTrue(a.rejected)

        a.school = s2
        a.save()

        self.assertEquals(a.delegates.count(), 0)
        self.assertEquals(a.rejected, False)
Ejemplo n.º 24
0
    def test_update_assignment(self):
        '''Tests that when an assignment changes schools, its rejected
           field is set to False and any delegates assigned to it are
           no longer assigned to it.'''
        s1 = models.new_school(name='S1')
        r1 = models.new_registration(school=s1)
        s2 = models.new_school(name='S2')
        r2 = models.new_registration(school=s2)
        a = models.new_assignment(registration=r1, rejected=True)
        d1 = models.new_delegate(school=s1, assignment=a)
        d2 = models.new_delegate(school=s1, assignment=a)
        self.assertEquals(a.delegates.count(), 2)
        self.assertTrue(a.rejected)

        a.registration = r2
        a.save()

        self.assertEquals(a.delegates.count(), 0)
        self.assertEquals(a.rejected, False)
Ejemplo n.º 25
0
 def setUp(self):
     self.advisor = models.new_user(username='******', password='******')
     self.advisor2 = models.new_user(
         username='******', password='******')
     self.chair = models.new_user(
         username='******', password='******', user_type=User.TYPE_CHAIR)
     self.delegate_user = models.new_user(
         username='******',
         password='******',
         user_type=User.TYPE_DELEGATE)
     self.school = models.new_school(user=self.advisor)
     self.school2 = models.new_school(user=self.advisor2)
     self.registration = models.new_registration(school=self.school)
     self.registration2 = models.new_registration(school=self.school2)
     self.committee = models.new_committee(user=self.chair)
     self.assignment = models.new_assignment(
         registration=self.registration, committee=self.committee)
     self.params['assignment'] = self.assignment.id
     self.params['school'] = self.school.id
Ejemplo n.º 26
0
    def test_delegate(self):
        '''Tests delegate can get secretariat information'''
        self.assignment = models.new_assignment()
        self.user = models.new_user(
            username='******',
            password='******',
            user_type=User.TYPE_DELEGATE,
            assignment=self.assignment, )
        self.client.login(username='******', password='******')
        response1 = self.get_response()
        self.assertEqual(response1.data, [])

        params2 = {'committee_id': self.empty_committee.id}
        response2 = self.get_response(params=params2)
        self.assertEqual(response2.data, [])

        params3 = {'committee_id': self.committee1.id}
        response3 = self.get_response(params=params3)
        self.assertEqual(response3.data, [
            {
                'id': self.sm1.id,
                'name': self.name1,
                'committee': self.committee1.id,
                'is_head_chair': self.is_head_chair1
            }, {
                'id': self.sm3.id,
                'name': self.name3,
                'committee': self.committee1.id,
                'is_head_chair': self.is_head_chair3
            }
        ])

        params4 = {'committee_id': self.committee2.id}
        resposne4 = self.get_response(params=params4)
        self.assertEqual(resposne4.data, [
            {
                'id': self.sm2.id,
                'name': self.name2,
                'committee': self.committee2.id,
                'is_head_chair': self.is_head_chair2
            }
        ])
Ejemplo n.º 27
0
 def setUp(self):
     self.advisor = models.new_user(username='******', password='******')
     self.chair = models.new_user(username='******',
                                  password='******',
                                  user_type=User.TYPE_CHAIR)
     self.delegate_user = models.new_user(username='******',
                                          password='******',
                                          user_type=User.TYPE_DELEGATE)
     self.delegate_user_2 = models.new_user(username='******',
                                            password='******',
                                            user_type=User.TYPE_DELEGATE)
     self.school = models.new_school(user=self.advisor)
     self.registration = models.new_registration(school=self.school)
     self.committee = models.new_committee(user=self.chair)
     self.paper = models.new_position_paper()
     self.assignment = models.new_assignment(registration=self.registration,
                                             committee=self.committee,
                                             paper=self.paper)
     self.delegate = models.new_delegate(user=self.delegate_user,
                                         assignment=self.assignment,
                                         school=self.school)
Ejemplo n.º 28
0
    def setUp(self):
        self.advisor = models.new_user(username='******', password='******')
        self.advisor2 = models.new_user(
            username='******', password='******')
        self.chair = models.new_user(
            username='******', password='******', user_type=User.TYPE_CHAIR)
        self.delegate_user = models.new_user(
            username='******',
            password='******',
            user_type=User.TYPE_DELEGATE)
        self.school = models.new_school(user=self.advisor)
        self.school2 = models.new_school(user=self.advisor2)
        self.registration = models.new_registration(school=self.school)
        self.registration2 = models.new_registration(school=self.school2)
        self.committee = models.new_committee(user=self.chair)

        self.assignment1 = models.new_assignment(
            registration=self.registration, committee=self.committee)
        self.assignment2 = models.new_assignment(
            registration=self.registration)
        self.assignment3 = models.new_assignment(
            registration=self.registration2, committee=self.committee)
        self.new_assignment = models.new_assignment(
            registration=self.registration)
        self.new_assignment2 = models.new_assignment(
            registration=self.registration2)
        self.faulty_assignment = models.new_assignment()

        self.delegate1 = models.new_delegate(
            name="Nathaniel Parke",
            school=self.school,
            assignment=self.assignment1)

        self.delegate2 = models.new_delegate(
            name='Trevor Dowds',
            school=self.school,
            assignment=self.assignment2)

        self.delegate3 = models.new_delegate(
            name='Kunal Mehta',
            school=self.school2,
            assignment=self.assignment3)

        self.params = [
            {'id': self.delegate1.id,
             'assignment': self.new_assignment.id}, {'id': self.delegate2.id,
                                                     'assignment': None}
        ]
Ejemplo n.º 29
0
 def setUp(self):
     self.position_paper = PositionPaper.objects.create()
     self.assignment = models.new_assignment(paper=self.position_paper)
Ejemplo n.º 30
0
 def test_other_chair(self):
     a = models.new_assignment()
     chair = models.new_user(
         user_type=User.TYPE_CHAIR, committee=a.committee)
     self.as_user(chair).do_test(expected_error=auto.EXP_PERMISSION_DENIED)
Ejemplo n.º 31
0
    def setUp(self):
        self.committee_1 = models.new_committee(name='UNSC')
        self.committee_2 = models.new_committee(name='HSC')
        self.params1 = {
            'comment': "I never got called on ever. SAD!",
            'rating': 4,
            'chair_1_name': "Jake Tibbetts",
            'chair_1_comment': "He was the head chair",
            'chair_1_rating': 10,
            'chair_2_name': "Trent",
            'chair_2_comment': "He was the funny one",
            'chair_2_rating': 3,
            'chair_3_name': "Suchi",
            'chair_3_comment': "She was the cute one",
            'chair_3_rating': 8,
            'chair_4_name': "Nikhil",
            'chair_4_comment': "He was the baby",
            'chair_4_rating': 1,
            'chair_5_name': "",
            'chair_5_comment': "",
            'chair_5_rating': 0,
            'chair_6_name': "",
            'chair_6_comment': "",
            'chair_6_rating': 0,
            'chair_7_name': "",
            'chair_7_comment': "",
            'chair_7_rating': 0,
            'chair_8_name': "",
            'chair_8_comment': "",
            'chair_8_rating': 0,
            'chair_9_name': "",
            'chair_9_comment': "",
            'chair_9_rating': 0,
            'chair_10_name': "",
            'chair_10_comment': "",
            'chair_10_rating': 0
        }

        self.params2 = {
            'comment': "Not Good",
            'rating': 3,
            'chair_1_name': "Jak Tibetts",
            'chair_1_comment': "He was a literal chair",
            'chair_1_rating': 8,
            'chair_2_name': "Tent Gumberg",
            'chair_2_comment': "He was the gummy one",
            'chair_2_rating': 4,
            'chair_3_name': "Suchi Luchi",
            'chair_3_comment': "She was the muchi one",
            'chair_3_rating': 6,
            'chair_4_name': "Nikhil the pill",
            'chair_4_comment': "He was the still just the baby",
            'chair_4_rating': 2,
            'chair_5_name': "",
            'chair_5_comment': "",
            'chair_5_rating': 0,
            'chair_6_name': "",
            'chair_6_comment': "",
            'chair_6_rating': 0,
            'chair_7_name': "",
            'chair_7_comment': "",
            'chair_7_rating': 0,
            'chair_8_name': "",
            'chair_8_comment': "",
            'chair_8_rating': 0,
            'chair_9_name': "",
            'chair_9_comment': "",
            'chair_9_rating': 0,
            'chair_10_name': "",
            'chair_10_comment': "",
            'chair_10_rating': 0
        }

        self.feedback_1 = models.new_committee_feedback(
            committee=self.committee_1,
            comment=self.params1['comment'],
            rating=self.params1['rating'],
            chair_1_name=self.params1['chair_1_name'],
            chair_1_comment=self.params1['chair_1_comment'],
            chair_1_rating=self.params1['chair_1_rating'],
            chair_2_name=self.params1['chair_2_name'],
            chair_2_comment=self.params1['chair_2_comment'],
            chair_2_rating=self.params1['chair_2_rating'],
            chair_3_name=self.params1['chair_3_name'],
            chair_3_comment=self.params1['chair_3_comment'],
            chair_3_rating=self.params1['chair_3_rating'],
            chair_4_name=self.params1['chair_4_name'],
            chair_4_comment=self.params1['chair_4_comment'],
            chair_4_rating=self.params1['chair_4_rating'],
            chair_5_name=self.params1['chair_5_name'],
            chair_5_comment=self.params1['chair_5_comment'],
            chair_5_rating=self.params1['chair_5_rating'],
            chair_6_name=self.params1['chair_6_name'],
            chair_6_comment=self.params1['chair_6_comment'],
            chair_6_rating=self.params1['chair_6_rating'],
            chair_7_name=self.params1['chair_7_name'],
            chair_7_comment=self.params1['chair_7_comment'],
            chair_7_rating=self.params1['chair_7_rating'],
            chair_8_name=self.params1['chair_8_name'],
            chair_8_comment=self.params1['chair_8_comment'],
            chair_8_rating=self.params1['chair_8_rating'],
            chair_9_name=self.params1['chair_9_name'],
            chair_9_comment=self.params1['chair_9_comment'],
            chair_9_rating=self.params1['chair_9_rating'],
            chair_10_name=self.params1['chair_10_name'],
            chair_10_comment=self.params1['chair_10_comment'],
            chair_10_rating=self.params1['chair_10_rating'])

        self.feedback_2 = models.new_committee_feedback(
            committee=self.committee_2,
            comment=self.params2['comment'],
            rating=self.params2['rating'],
            chair_1_name=self.params2['chair_1_name'],
            chair_1_comment=self.params2['chair_1_comment'],
            chair_1_rating=self.params2['chair_1_rating'],
            chair_2_name=self.params2['chair_2_name'],
            chair_2_comment=self.params2['chair_2_comment'],
            chair_2_rating=self.params2['chair_2_rating'],
            chair_3_name=self.params2['chair_3_name'],
            chair_3_comment=self.params2['chair_3_comment'],
            chair_3_rating=self.params2['chair_3_rating'],
            chair_4_name=self.params2['chair_4_name'],
            chair_4_comment=self.params2['chair_4_comment'],
            chair_4_rating=self.params2['chair_4_rating'],
            chair_5_name=self.params2['chair_5_name'],
            chair_5_comment=self.params2['chair_5_comment'],
            chair_5_rating=self.params2['chair_5_rating'],
            chair_6_name=self.params2['chair_6_name'],
            chair_6_comment=self.params2['chair_6_comment'],
            chair_6_rating=self.params2['chair_6_rating'],
            chair_7_name=self.params2['chair_7_name'],
            chair_7_comment=self.params2['chair_7_comment'],
            chair_7_rating=self.params2['chair_7_rating'],
            chair_8_name=self.params2['chair_8_name'],
            chair_8_comment=self.params2['chair_8_comment'],
            chair_8_rating=self.params2['chair_8_rating'],
            chair_9_name=self.params2['chair_9_name'],
            chair_9_comment=self.params2['chair_9_comment'],
            chair_9_rating=self.params2['chair_9_rating'],
            chair_10_name=self.params2['chair_10_name'],
            chair_10_comment=self.params2['chair_10_comment'],
            chair_10_rating=self.params2['chair_10_rating'])
        self.assignment_1 = models.new_assignment(committee=self.committee_1)
Ejemplo n.º 32
0
 def get_test_object(cls):
     return models.new_assignment()
Ejemplo n.º 33
0
 def setUp(self):
     self.assignment = models.new_assignment()
     self.speech = models.new_speech(assignment=self.assignment)
Ejemplo n.º 34
0
 def setUp(self):
     self.user = models.new_user(username='******', password='******')
     self.school = models.new_school(user=self.user)
     self.assignment = models.new_assignment(school=self.school)
Ejemplo n.º 35
0
 def test_other_chair(self):
     a = models.new_assignment()
     chair = models.new_user(user_type=User.TYPE_CHAIR,
                             committee=a.committee)
     self.as_user(chair).do_test(expected_error=auto.EXP_PERMISSION_DENIED)
Ejemplo n.º 36
0
 def setUp(self):
     self.school = models.new_school(name='S1')
     self.registration = models.new_registration()
     self.assignment1 = models.new_assignment(registration=self.registration)
     self.assignment2 = models.new_assignment(registration=self.registration)
Ejemplo n.º 37
0
 def setUp(self):
     self.user = models.new_user(username='******', password='******')
     self.school = models.new_school(user=self.user)
     self.assignment = models.new_assignment(school=self.school)
     self.delegate = models.new_delegate(assignment=self.assignment, school=self.school)
     self.params['assignment'] = self.assignment.id
Ejemplo n.º 38
0
 def test_chair(self):
     a = models.new_assignment(paper=self.object)
     chair = models.new_user(
         user_type=User.TYPE_CHAIR, committee=a.committee)
     self.as_user(chair).do_test()
Ejemplo n.º 39
0
 def get_test_object(cls):
     return models.new_assignment()
Ejemplo n.º 40
0
 def setUp(self):
     self.position_paper = PositionPaper.objects.create()
     self.assignment = models.new_assignment(paper=self.position_paper)
Ejemplo n.º 41
0
 def test_advisor(self):
     user = models.new_user()
     school = models.new_school(user=user)
     registration = models.new_registration(school=school)
     a = models.new_assignment(paper=self.object, registration=registration)
     self.as_user(user).do_test(expected_error=auto.EXP_PERMISSION_DENIED)
Ejemplo n.º 42
0
 def test_advisor(self):
     user = models.new_user()
     school = models.new_school(user=user)
     registration = models.new_registration(school=school)
     a = models.new_assignment(paper=self.object, registration=registration)
     self.as_user(user).do_test(expected_error=auto.EXP_PERMISSION_DENIED)
Ejemplo n.º 43
0
    def setUp(self):
        self.committee_1 = models.new_committee(name='DISC')
        self.committee_2 = models.new_committee(name='SOCHUM')

        self.params1 = {
            'comment': "I never got called on ever. SAD!",
            'rating': 4,
            'chair_1_name': "Jake Tibbetts",
            'chair_1_comment': "He was the head chair",
            'chair_1_rating': 10,
            'chair_2_name': "Trent",
            'chair_2_comment': "He was the funny one",
            'chair_2_rating': 3,
            'chair_3_name': "Suchi",
            'chair_3_comment': "She was the cute one",
            'chair_3_rating': 8,
            'chair_4_name': "Nikhil",
            'chair_4_comment': "He was the baby",
            'chair_4_rating': 1,
            'chair_5_name': "",
            'chair_5_comment': "",
            'chair_5_rating': 0,
            'chair_6_name': "",
            'chair_6_comment': "",
            'chair_6_rating': 0,
            'chair_7_name': "",
            'chair_7_comment': "",
            'chair_7_rating': 0,
            'chair_8_name': "",
            'chair_8_comment': "",
            'chair_8_rating': 0,
            'chair_9_name': "",
            'chair_9_comment': "",
            'chair_9_rating': 0,
            'chair_10_name': "",
            'chair_10_comment': "",
            'chair_10_rating': 0
        }

        self.params2 = {
            'comment': "Not Good",
            'rating': 3,
            'chair_1_name': "Jak Tibetts",
            'chair_1_comment': "He was a literal chair",
            'chair_1_rating': 8,
            'chair_2_name': "Tent Gumberg",
            'chair_2_comment': "He was the gummy one",
            'chair_2_rating': 4,
            'chair_3_name': "Suchi Luchi",
            'chair_3_comment': "She was the muchi one",
            'chair_3_rating': 6,
            'chair_4_name': "Nikhil the pill",
            'chair_4_comment': "He was the still just the baby",
            'chair_4_rating': 2,
            'chair_5_name': "",
            'chair_5_comment': "",
            'chair_5_rating': 0,
            'chair_6_name': "",
            'chair_6_comment': "",
            'chair_6_rating': 0,
            'chair_7_name': "",
            'chair_7_comment': "",
            'chair_7_rating': 0,
            'chair_8_name': "",
            'chair_8_comment': "",
            'chair_8_rating': 0,
            'chair_9_name': "",
            'chair_9_comment': "",
            'chair_9_rating': 0,
            'chair_10_name': "",
            'chair_10_comment': "",
            'chair_10_rating': 0
        }

        self.params3 = {
            'comment': "Amazing",
            'rating': 9,
            'chair_1_name': "KT Lee",
            'chair_1_comment': "Best Chair 5evr",
            'chair_1_rating': 9,
            'chair_2_name': "Gent Tumberg",
            'chair_2_comment': "He was the jummy one",
            'chair_2_rating': 5,
            'chair_3_name': "Sita McLiar",
            'chair_3_comment': "",
            'chair_3_rating': 5,
            'chair_4_name': "The Spirit of BMUN",
            'chair_4_comment': "The Spirit of BMUN is ever strong",
            'chair_4_rating': 3,
            'chair_5_name': "Annalise!!!!",
            'chair_5_comment': "She's the best!!!!",
            'chair_5_rating': 9,
            'chair_6_name': "",
            'chair_6_comment': "",
            'chair_6_rating': 0,
            'chair_7_name': "",
            'chair_7_comment': "",
            'chair_7_rating': 0,
            'chair_8_name': "",
            'chair_8_comment': "",
            'chair_8_rating': 0,
            'chair_9_name': "",
            'chair_9_comment': "",
            'chair_9_rating': 0,
            'chair_10_name': "",
            'chair_10_comment': "",
            'chair_10_rating': 0
        }

        self.feedback_1 = models.new_committee_feedback(
            committee=self.committee_1,
            comment=self.params1['comment'],
            rating=self.params1['rating'],
            chair_1_name=self.params1['chair_1_name'],
            chair_1_comment=self.params1['chair_1_comment'],
            chair_1_rating=self.params1['chair_1_rating'],
            chair_2_name=self.params1['chair_2_name'],
            chair_2_comment=self.params1['chair_2_comment'],
            chair_2_rating=self.params1['chair_2_rating'],
            chair_3_name=self.params1['chair_3_name'],
            chair_3_comment=self.params1['chair_3_comment'],
            chair_3_rating=self.params1['chair_3_rating'],
            chair_4_name=self.params1['chair_4_name'],
            chair_4_comment=self.params1['chair_4_comment'],
            chair_4_rating=self.params1['chair_4_rating'],
            chair_5_name=self.params1['chair_5_name'],
            chair_5_comment=self.params1['chair_5_comment'],
            chair_5_rating=self.params1['chair_5_rating'],
            chair_6_name=self.params1['chair_6_name'],
            chair_6_comment=self.params1['chair_6_comment'],
            chair_6_rating=self.params1['chair_6_rating'],
            chair_7_name=self.params1['chair_7_name'],
            chair_7_comment=self.params1['chair_7_comment'],
            chair_7_rating=self.params1['chair_7_rating'],
            chair_8_name=self.params1['chair_8_name'],
            chair_8_comment=self.params1['chair_8_comment'],
            chair_8_rating=self.params1['chair_8_rating'],
            chair_9_name=self.params1['chair_9_name'],
            chair_9_comment=self.params1['chair_9_comment'],
            chair_9_rating=self.params1['chair_9_rating'],
            chair_10_name=self.params1['chair_10_name'],
            chair_10_comment=self.params1['chair_10_comment'],
            chair_10_rating=self.params1['chair_10_rating'])
        self.feedback_2 = models.new_committee_feedback(
            committee=self.committee_1,
            comment=self.params2['comment'],
            rating=self.params2['rating'],
            chair_1_name=self.params2['chair_1_name'],
            chair_1_comment=self.params2['chair_1_comment'],
            chair_1_rating=self.params2['chair_1_rating'],
            chair_2_name=self.params2['chair_2_name'],
            chair_2_comment=self.params2['chair_2_comment'],
            chair_2_rating=self.params2['chair_2_rating'],
            chair_3_name=self.params2['chair_3_name'],
            chair_3_comment=self.params2['chair_3_comment'],
            chair_3_rating=self.params2['chair_3_rating'],
            chair_4_name=self.params2['chair_4_name'],
            chair_4_comment=self.params2['chair_4_comment'],
            chair_4_rating=self.params2['chair_4_rating'],
            chair_5_name=self.params2['chair_5_name'],
            chair_5_comment=self.params2['chair_5_comment'],
            chair_5_rating=self.params2['chair_5_rating'],
            chair_6_name=self.params2['chair_6_name'],
            chair_6_comment=self.params2['chair_6_comment'],
            chair_6_rating=self.params2['chair_6_rating'],
            chair_7_name=self.params2['chair_7_name'],
            chair_7_comment=self.params2['chair_7_comment'],
            chair_7_rating=self.params2['chair_7_rating'],
            chair_8_name=self.params2['chair_8_name'],
            chair_8_comment=self.params2['chair_8_comment'],
            chair_8_rating=self.params2['chair_8_rating'],
            chair_9_name=self.params2['chair_9_name'],
            chair_9_comment=self.params2['chair_9_comment'],
            chair_9_rating=self.params2['chair_9_rating'],
            chair_10_name=self.params2['chair_10_name'],
            chair_10_comment=self.params2['chair_10_comment'],
            chair_10_rating=self.params2['chair_10_rating'])
        self.feedback_3 = models.new_committee_feedback(
            committee=self.committee_2,
            comment=self.params3['comment'],
            rating=self.params3['rating'],
            chair_1_name=self.params3['chair_1_name'],
            chair_1_comment=self.params3['chair_1_comment'],
            chair_1_rating=self.params3['chair_1_rating'],
            chair_2_name=self.params3['chair_2_name'],
            chair_2_comment=self.params3['chair_2_comment'],
            chair_2_rating=self.params3['chair_2_rating'],
            chair_3_name=self.params3['chair_3_name'],
            chair_3_comment=self.params3['chair_3_comment'],
            chair_3_rating=self.params3['chair_3_rating'],
            chair_4_name=self.params3['chair_4_name'],
            chair_4_comment=self.params3['chair_4_comment'],
            chair_4_rating=self.params3['chair_4_rating'],
            chair_5_name=self.params3['chair_5_name'],
            chair_5_comment=self.params3['chair_5_comment'],
            chair_5_rating=self.params3['chair_5_rating'],
            chair_6_name=self.params3['chair_6_name'],
            chair_6_comment=self.params3['chair_6_comment'],
            chair_6_rating=self.params3['chair_6_rating'],
            chair_7_name=self.params3['chair_7_name'],
            chair_7_comment=self.params3['chair_7_comment'],
            chair_7_rating=self.params3['chair_7_rating'],
            chair_8_name=self.params3['chair_8_name'],
            chair_8_comment=self.params3['chair_8_comment'],
            chair_8_rating=self.params3['chair_8_rating'],
            chair_9_name=self.params3['chair_9_name'],
            chair_9_comment=self.params3['chair_9_comment'],
            chair_9_rating=self.params3['chair_9_rating'],
            chair_10_name=self.params3['chair_10_name'],
            chair_10_comment=self.params3['chair_10_comment'],
            chair_10_rating=self.params3['chair_10_rating'])
        self.assignment_1 = models.new_assignment(committee=self.committee_1)
Ejemplo n.º 44
0
 def setUp(self):
     self.user = models.new_user(username='******', password='******')
     self.school = models.new_school(user=self.user)
     self.assignment = models.new_assignment(school=self.school)
Ejemplo n.º 45
0
 def test_chair(self):
     a = models.new_assignment(paper=self.object)
     chair = models.new_user(user_type=User.TYPE_CHAIR,
                             committee=a.committee)
     self.as_user(chair).do_test()