'Tests the static tabs that available only for instructor'

def test_course_tabs_staff_only(self):

    self.course.tabs.append(xmodule_tabs.CourseTab.load('static_tab', name='Static    Tab    Free', url_slug='extra_tab_1', course_staff_only=False))
    self.course.tabs.append(xmodule_tabs.CourseTab.load('static_tab', name='Static    Tab    Instructors    Only', url_slug='extra_tab_2', course_staff_only=True))
    self.course.save()
    user = self.create_mock_user(is_authenticated=True, is_staff=False, is_enrolled=True)
    request = get_mock_request(user)
    course_tab_list = get_course_tab_list(request, self.course)
    name_list = [x.name for x in course_tab_list]
    self.assertIn('Static    Tab    Free', name_list)
    self.assertNotIn('Static    Tab    Instructors    Only', name_list)
    self.client.logout()
    staff_user = StaffFactory(course_key=self.course.id)
    self.client.login(username=staff_user.username, password='test')
    request = get_mock_request(staff_user)
    course_tab_list_staff = get_course_tab_list(request, self.course)
    name_list_staff = [x.name for x in course_tab_list_staff]
    self.assertIn('Static    Tab    Free', name_list_staff)
    self.assertIn('Static    Tab    Instructors    Only', name_list_staff)
