Beispiel #1
0
    def setUp(self):
        super(DiscussionLinkTestCase, self).setUp()

        self.tabs_with_discussion = [
            tabs.CoursewareTab(),
            tabs.CourseInfoTab(),
            tabs.DiscussionTab(),
            tabs.TextbookTabs(),
        ]
        self.tabs_without_discussion = [
            tabs.CoursewareTab(),
            tabs.CourseInfoTab(),
            tabs.TextbookTabs(),
        ]
Beispiel #2
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)
Beispiel #3
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)