Beispiel #1
0
 def test_to_list(self):
     lists = [['Prepod name', ['7333'], '122', True],
              ['Prepod name', ['2780.2'], 'КВАНТ-КК', False],
              ['Prepod name', [], '', False]]
     for (l, init_value) in zip(lists, self.init_values):
         lesson = Lesson.cell_parser(init_value)
         self.assertEqual(l, lesson.to_list(prepod_name='Prepod name'))
Beispiel #2
0
 def test_groups(self):
     groups = [['7333'], ['2780.2'], []]
     for (groups, init_value) in zip(groups, self.init_values):
         lesson = Lesson.cell_parser(init_value)
         self.assertEqual(groups, lesson.get_groups())
Beispiel #3
0
 def test_comp_classes_flag(self):
     in_comp_classes = [True, False, False]
     for (flag, init_value) in zip(in_comp_classes, self.init_values):
         lesson = Lesson.cell_parser(init_value)
         self.assertEqual(flag, lesson.is_in_computer_class())
Beispiel #4
0
 def test_classrooms(self):
     classrooms = ['122', 'КВАНТ-КК', '']
     for (classroom, init_value) in zip(classrooms, self.init_values):
         lesson = Lesson.cell_parser(init_value)
         self.assertEqual(classroom, lesson.get_classroom())
Beispiel #5
0
 def test_nums(self):
     nums = ['17', '6', '']
     for (num, init_value) in zip(nums, self.init_values):
         lesson = Lesson.cell_parser(init_value)
         self.assertEqual(num, lesson.get_lesson_num())
Beispiel #6
0
 def test_names(self):
     names = ['Безопасность ОС', '2780', '']
     for (name, init_value) in zip(names, self.init_values):
         lesson = Lesson.cell_parser(init_value)
         self.assertEqual(name, lesson.get_name())
Beispiel #7
0
 def test_types(self):
     types = ['ПЗ', 'ПЗ', '']
     for (tp, init_value) in zip(types, self.init_values):
         lesson = Lesson.cell_parser(init_value)
         self.assertEqual(tp, lesson.get_type())
Beispiel #8
0
 def test_entry_value(self):
     for init_value in self.init_values:
         lesson = Lesson.cell_parser(init_value)
         self.assertEqual(init_value, lesson.get_entry_value())