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
6d20292a
Commit
6d20292a
authored
Dec 28, 2012
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add unit test to make sure rewriting is occuring when querying the handouts
parent
7a4d89b1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
cms/djangoapps/contentstore/tests/tests.py
+24
-0
No files found.
cms/djangoapps/contentstore/tests/tests.py
View file @
6d20292a
...
...
@@ -7,6 +7,7 @@ from django.conf import settings
from
django.core.urlresolvers
import
reverse
from
path
import
path
from
tempfile
import
mkdtemp
import
json
from
student.models
import
Registration
from
django.contrib.auth.models
import
User
...
...
@@ -417,6 +418,29 @@ class ContentStoreTest(TestCase):
shutil
.
rmtree
(
root_dir
)
def
test_course_handouts_rewrites
(
self
):
ms
=
modulestore
(
'direct'
)
cs
=
contentstore
()
import_from_xml
(
ms
,
'common/test/data/'
,
[
'full'
])
handout_location
=
Location
([
'i4x'
,
'edX'
,
'full'
,
'course_info'
,
'handouts'
])
resp
=
self
.
client
.
get
(
reverse
(
'module_info'
,
kwargs
=
{
'module_location'
:
handout_location
}))
self
.
assertEqual
(
resp
.
status_code
,
200
)
# check that /static/ has been converted to the full path
self
.
assertContains
(
resp
,
'/c4x/edX/full/asset/handouts_schematic_tutorial.pdf'
)
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