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
5bf839c9
Commit
5bf839c9
authored
Mar 28, 2013
by
Will Daly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Guard against trying to load a template when checking pages.
parent
d92533bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
lms/djangoapps/courseware/tests/tests.py
+13
-2
No files found.
lms/djangoapps/courseware/tests/tests.py
View file @
5bf839c9
...
...
@@ -287,8 +287,19 @@ class PageLoaderTestCase(LoginEnrollmentTestCase):
self
.
enroll
(
course
)
course_id
=
course
.
id
descriptor
=
random
.
choice
(
module_store
.
get_items
(
Location
(
None
,
None
,
None
,
None
,
None
)))
# Search for items in the course
# None is treated as a wildcard
course_loc
=
course
.
location
location_query
=
Location
(
course_loc
.
tag
,
course_loc
.
org
,
course_loc
.
course
,
None
,
None
,
None
)
items
=
module_store
.
get_items
(
location_query
)
if
len
(
items
)
<
1
:
self
.
fail
(
'Could not retrieve any items from course'
)
else
:
descriptor
=
random
.
choice
(
items
)
# We have ancillary course information now as modules
...
...
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