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
959274c7
Commit
959274c7
authored
Jul 02, 2013
by
Ned Batchelder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adapt the tests to the new way of making URLs.
parent
27c70ead
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
lms/djangoapps/staticbook/tests.py
+3
-3
No files found.
lms/djangoapps/staticbook/tests.py
View file @
959274c7
...
...
@@ -120,14 +120,14 @@ class StaticPdfBookTest(StaticBookTest):
course
=
self
.
make_course
(
pdf_textbooks
=
[
PDF_BOOK
])
# It's no longer possible to use a non-integer chapter.
with
self
.
assertRaises
(
NoReverseMatch
):
reverse
(
'pdf_book'
,
kwargs
=
{
'course_id'
:
course
.
id
,
'book_index'
:
0
,
'chapter'
:
'xyzzy'
}
)
self
.
make_url
(
'pdf_book'
,
book_index
=
0
,
chapter
=
'xyzzy'
)
def
test_page_xss
(
self
):
# The page in the URL used to go right on the page.
course
=
self
.
make_course
(
pdf_textbooks
=
[
PDF_BOOK
])
# It's no longer possible to use a non-integer page.
with
self
.
assertRaises
(
NoReverseMatch
):
reverse
(
'pdf_book'
,
kwargs
=
{
'course_id'
:
course
.
id
,
'book_index'
:
0
,
'page'
:
'xyzzy'
}
)
self
.
make_url
(
'pdf_book'
,
book_index
=
0
,
page
=
'xyzzy'
)
class
StaticHtmlBookTest
(
StaticBookTest
):
...
...
@@ -170,4 +170,4 @@ class StaticHtmlBookTest(StaticBookTest):
course
=
self
.
make_course
(
pdf_textbooks
=
[
HTML_BOOK
])
# It's no longer possible to use a non-integer chapter.
with
self
.
assertRaises
(
NoReverseMatch
):
reverse
(
'html_book'
,
kwargs
=
{
'course_id'
:
course
.
id
,
'book_index'
:
0
,
'chapter'
:
'xyzzy'
}
)
self
.
make_url
(
'html_book'
,
book_index
=
0
,
chapter
=
'xyzzy'
)
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