Separate CourseInfo tests into a separate ModulestoreTestCase
This commit is contained in:
@@ -46,9 +46,6 @@ class CourseInfoTestCase(LoginEnrollmentTestCase, SharedModuleStoreTestCase):
|
||||
data="OOGIE BLOOGIE", display_name="updates"
|
||||
)
|
||||
|
||||
def setUp(self):
|
||||
super(CourseInfoTestCase, self).setUp()
|
||||
|
||||
def test_logged_in_unenrolled(self):
|
||||
self.setup_user()
|
||||
url = reverse('info', args=[self.course.id.to_deprecated_string()])
|
||||
@@ -101,6 +98,21 @@ class CourseInfoTestCase(LoginEnrollmentTestCase, SharedModuleStoreTestCase):
|
||||
response = self.client.get(url)
|
||||
self.assertEqual(response.status_code, 404)
|
||||
|
||||
|
||||
@attr('shard_1')
|
||||
class CourseInfoLastAccessedTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase):
|
||||
"""
|
||||
Tests of the CourseInfo last accessed link.
|
||||
"""
|
||||
|
||||
def setUp(self):
|
||||
super(CourseInfoLastAccessedTestCase, self).setUp()
|
||||
self.course = CourseFactory.create()
|
||||
self.page = ItemFactory.create(
|
||||
category="course_info", parent_location=self.course.location,
|
||||
data="OOGIE BLOOGIE", display_name="updates"
|
||||
)
|
||||
|
||||
def test_last_accessed_courseware_not_shown(self):
|
||||
"""
|
||||
Test that the last accessed courseware link is not shown if there
|
||||
@@ -134,6 +146,21 @@ class CourseInfoTestCase(LoginEnrollmentTestCase, SharedModuleStoreTestCase):
|
||||
content = pq(info_page_response.content)
|
||||
self.assertEqual(content('.page-header-secondary .last-accessed-link').attr('href'), section_url)
|
||||
|
||||
|
||||
@attr('shard_1')
|
||||
class CourseInfoTitleTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase):
|
||||
"""
|
||||
Tests of the CourseInfo page title.
|
||||
"""
|
||||
|
||||
def setUp(self):
|
||||
super(CourseInfoTitleTestCase, self).setUp()
|
||||
self.course = CourseFactory.create()
|
||||
self.page = ItemFactory.create(
|
||||
category="course_info", parent_location=self.course.location,
|
||||
data="OOGIE BLOOGIE", display_name="updates"
|
||||
)
|
||||
|
||||
def test_info_title(self):
|
||||
"""
|
||||
Test the info page on a course without any display_* settings against
|
||||
|
||||
Reference in New Issue
Block a user