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
008b7086
Commit
008b7086
authored
Aug 24, 2016
by
Matjaz Gregoric
Committed by
GitHub
Aug 24, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12978 from open-craft/mtyaka/update-wiki
Upgrade django-wiki to 0.0.9.
parents
84395dd8
c5f4ba0f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
3 deletions
+32
-3
lms/djangoapps/course_wiki/tests/tests.py
+31
-2
requirements/edx/github.txt
+1
-1
No files found.
lms/djangoapps/course_wiki/tests/tests.py
View file @
008b7086
...
@@ -86,11 +86,11 @@ class WikiRedirectTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase):
...
@@ -86,11 +86,11 @@ class WikiRedirectTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase):
"""
"""
course_wiki_home
=
reverse
(
'course_wiki'
,
kwargs
=
{
'course_id'
:
course
.
id
.
to_deprecated_string
()})
course_wiki_home
=
reverse
(
'course_wiki'
,
kwargs
=
{
'course_id'
:
course
.
id
.
to_deprecated_string
()})
referer
=
reverse
(
"progress"
,
kwargs
=
{
'course_id'
:
self
.
toy
.
id
.
to_deprecated_string
()})
referer
=
reverse
(
"progress"
,
kwargs
=
{
'course_id'
:
course
.
id
.
to_deprecated_string
()})
resp
=
self
.
client
.
get
(
course_wiki_home
,
follow
=
True
,
HTTP_REFERER
=
referer
)
resp
=
self
.
client
.
get
(
course_wiki_home
,
follow
=
True
,
HTTP_REFERER
=
referer
)
course_wiki_page
=
referer
.
replace
(
'progress'
,
'wiki/'
+
self
.
toy
.
wiki_slug
+
"/"
)
course_wiki_page
=
referer
.
replace
(
'progress'
,
'wiki/'
+
course
.
wiki_slug
+
"/"
)
ending_location
=
resp
.
redirect_chain
[
-
1
][
0
]
ending_location
=
resp
.
redirect_chain
[
-
1
][
0
]
...
@@ -167,3 +167,32 @@ class WikiRedirectTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase):
...
@@ -167,3 +167,32 @@ class WikiRedirectTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase):
resp
=
self
.
client
.
get
(
course_wiki_page
,
follow
=
True
)
resp
=
self
.
client
.
get
(
course_wiki_page
,
follow
=
True
)
target_url
,
__
=
resp
.
redirect_chain
[
-
1
]
target_url
,
__
=
resp
.
redirect_chain
[
-
1
]
self
.
assertIn
(
reverse
(
'signin_user'
),
target_url
)
self
.
assertIn
(
reverse
(
'signin_user'
),
target_url
)
@patch.dict
(
"django.conf.settings.FEATURES"
,
{
'ALLOW_WIKI_ROOT_ACCESS'
:
True
})
def
test_create_wiki_with_long_course_id
(
self
):
"""
Tests that the wiki is successfully created for courses that have
very long course ids.
"""
# Combined course key length is currently capped at 65 characters (see MAX_SUM_KEY_LENGTH
# in /common/static/common/js/components/utils/view_utils.js).
# The below key components combined are exactly 65 characters long.
org
=
'a-very-long-org-name'
course
=
'a-very-long-course-name'
display_name
=
'very-long-display-name'
# This is how wiki_slug is generated in cms/djangoapps/contentstore/views/course.py.
wiki_slug
=
"{0}.{1}.{2}"
.
format
(
org
,
course
,
display_name
)
self
.
assertEqual
(
len
(
org
+
course
+
display_name
),
65
)
# sanity check
course
=
CourseFactory
.
create
(
org
=
org
,
course
=
course
,
display_name
=
display_name
,
wiki_slug
=
wiki_slug
)
self
.
login
(
self
.
student
,
self
.
password
)
self
.
enroll
(
course
)
self
.
create_course_page
(
course
)
course_wiki_page
=
reverse
(
'wiki:get'
,
kwargs
=
{
'path'
:
course
.
wiki_slug
+
'/'
})
referer
=
reverse
(
"courseware"
,
kwargs
=
{
'course_id'
:
course
.
id
.
to_deprecated_string
()})
resp
=
self
.
client
.
get
(
course_wiki_page
,
follow
=
True
,
HTTP_REFERER
=
referer
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
requirements/edx/github.txt
View file @
008b7086
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
# Third-party:
# Third-party:
git+https://github.com/cyberdelia/django-pipeline.git@1.5.3#egg=django-pipeline==1.5.3
git+https://github.com/cyberdelia/django-pipeline.git@1.5.3#egg=django-pipeline==1.5.3
git+https://github.com/edx/django-wiki.git@v0.0.
8#egg=django-wiki==0.0.8
git+https://github.com/edx/django-wiki.git@v0.0.
9#egg=django-wiki==0.0.9
git+https://github.com/edx/django-openid-auth.git@0.8#egg=django-openid-auth==0.8
git+https://github.com/edx/django-openid-auth.git@0.8#egg=django-openid-auth==0.8
git+https://github.com/edx/MongoDBProxy.git@25b99097615bda06bd7cdfe5669ed80dc2a7fed0#egg=MongoDBProxy==0.1.0
git+https://github.com/edx/MongoDBProxy.git@25b99097615bda06bd7cdfe5669ed80dc2a7fed0#egg=MongoDBProxy==0.1.0
git+https://github.com/edx/nltk.git@2.0.6#egg=nltk==2.0.6
git+https://github.com/edx/nltk.git@2.0.6#egg=nltk==2.0.6
...
...
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