Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
bdf08fc7
Commit
bdf08fc7
authored
Jun 02, 2016
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Separate CourseInfo tests into a separate ModulestoreTestCase
parent
95054e1a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
3 deletions
+30
-3
lms/djangoapps/courseware/tests/test_course_info.py
+30
-3
No files found.
lms/djangoapps/courseware/tests/test_course_info.py
View file @
bdf08fc7
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment