Ejemplo n.º 1
0
    def test_genders(self):

        view = self.classlist1.restrictedTraverse(
            '@@upload-classlist-spreadsheet')
        gender_vocab = GENDER.__iter__()
        gender_list = []
        notfinished = True
        while notfinished:
            try:
                gender = gender_vocab.next()
                gender_list.append(gender.title)
            except StopIteration:
                notfinished = False
        self.assertEqual(view.genders(), gender_list)
    def test_genders(self):

        view = self.classlist1.restrictedTraverse(
               '@@upload-classlist-spreadsheet')
        gender_vocab = GENDER.__iter__()
        gender_list = []
        notfinished = True;
        while notfinished:            
            try:
                gender = gender_vocab.next()
                gender_list.append(gender.title)
            except StopIteration:
                notfinished = False;
        self.assertEqual(view.genders(),gender_list)
Ejemplo n.º 3
0
    def genders(self):
        """ Return the contents of gender dictionary as a list of strings
            This may seem redundant as it contains 2 entries but is necessary
            to ensure translated versions are correctly checked against.
        """

        gender_vocab = GENDER.__iter__()
        gender_list = []
        notfinished = True;
        while notfinished:            
            try:
                gender = gender_vocab.next()
                gender_list.append(gender.title)
            except StopIteration:
                notfinished = False;

        return gender_list