Пример #1
0
    def test_textbooks0(self):

        self.assertEqual(tabs._textbooks(self.tab, self.mockuser1,
                                         self.course, self.active_pageX), [])

        self.assertEqual(tabs._textbooks(self.tab, self.mockuser0,
                                         self.course, self.active_pageX), [])
Пример #2
0
    def test_textbooks0(self):

        self.assertEqual(tabs._textbooks(self.tab, self.mockuser1,
                                         self.course, self.active_pageX), [])

        self.assertEqual(tabs._textbooks(self.tab, self.mockuser0,
                                         self.course, self.active_pageX), [])
Пример #3
0
    def test_textbooks1(self):

        self.assertEqual(tabs._textbooks(self.tab, self.mockuser1,
                                         self.course, self.active_page0)[0].name,
                         'Algebra')

        self.assertEqual(tabs._textbooks(self.tab, self.mockuser1,
                                         self.course, self.active_page0)[0].link,
                         reverse('book', args=[self.course.id, 0]))

        self.assertEqual(tabs._textbooks(self.tab, self.mockuser1,
                                         self.course, self.active_page0)[0].is_active,
                         True)

        self.assertEqual(tabs._textbooks(self.tab, self.mockuser1,
                                         self.course, self.active_pageX)[0].is_active,
                         False)

        self.assertEqual(tabs._textbooks(self.tab, self.mockuser1,
                                         self.course, self.active_page1)[1].name,
                         'Topology')

        self.assertEqual(tabs._textbooks(self.tab, self.mockuser1,
                                         self.course, self.active_page1)[1].link,
                         reverse('book', args=[self.course.id, 1]))

        self.assertEqual(tabs._textbooks(self.tab, self.mockuser1,
                                         self.course, self.active_page1)[1].is_active,
                         True)

        self.assertEqual(tabs._textbooks(self.tab, self.mockuser1,
                                         self.course, self.active_pageX)[1].is_active,
                         False)
Пример #4
0
    def test_textbooks1(self):

        self.assertEqual(tabs._textbooks(self.tab, self.mockuser1,
                                         self.course, self.active_page0)[0].name,
                         'Algebra')

        self.assertEqual(tabs._textbooks(self.tab, self.mockuser1,
                                         self.course, self.active_page0)[0].link,
                         reverse('book', args=[self.course.id, 0]))

        self.assertEqual(tabs._textbooks(self.tab, self.mockuser1,
                                         self.course, self.active_page0)[0].is_active,
                         True)

        self.assertEqual(tabs._textbooks(self.tab, self.mockuser1,
                                         self.course, self.active_pageX)[0].is_active,
                         False)

        self.assertEqual(tabs._textbooks(self.tab, self.mockuser1,
                                         self.course, self.active_page1)[1].name,
                         'Topology')

        self.assertEqual(tabs._textbooks(self.tab, self.mockuser1,
                                         self.course, self.active_page1)[1].link,
                         reverse('book', args=[self.course.id, 1]))

        self.assertEqual(tabs._textbooks(self.tab, self.mockuser1,
                                         self.course, self.active_page1)[1].is_active,
                         True)

        self.assertEqual(tabs._textbooks(self.tab, self.mockuser1,
                                         self.course, self.active_pageX)[1].is_active,
                         False)