Example #1
0
 def setUp(self):
     self.course = CourseFactory.create()
     self.set_up_books(2)
     self.course.tabs = [
         tabs.CoursewareTab(),
         tabs.CourseInfoTab(),
         tabs.TextbookTabs(),
         tabs.PDFTextbookTabs(),
         tabs.HtmlTextbookTabs(),
     ]
     self.setup_user()
     self.enroll(self.course)
     self.num_textbook_tabs = sum(1 for tab in self.course.tabs
                                  if isinstance(tab, tabs.TextbookTabsBase))
     self.num_textbooks = self.num_textbook_tabs * len(self.books)
Example #2
0
    def setUp(self):
        super(TextbooksTestCase, self).setUp()

        self.set_up_books(2)

        self.dict_tab = MagicMock()
        self.course.tabs = [
            tabs.CoursewareTab(),
            tabs.CourseInfoTab(),
            tabs.TextbookTabs(),
            tabs.PDFTextbookTabs(),
            tabs.HtmlTextbookTabs(),
        ]
        self.num_textbook_tabs = sum(1 for tab in self.course.tabs
                                     if isinstance(tab, tabs.TextbookTabsBase))
        self.num_textbooks = self.num_textbook_tabs * len(self.books)