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
ff0a6fb7
Commit
ff0a6fb7
authored
Feb 14, 2014
by
thedeadparrot
Committed by
Julia Hansbrough
Feb 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update cms urls for language preferences
parent
05537540
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
5 deletions
+8
-5
cms/urls.py
+1
-0
common/djangoapps/lang_pref/tests/test_views.py
+1
-0
common/djangoapps/lang_pref/urls.py
+1
-1
common/djangoapps/lang_pref/views.py
+1
-0
common/test/acceptance/tests/test_lms.py
+4
-4
No files found.
cms/urls.py
View file @
ff0a6fb7
...
...
@@ -38,6 +38,7 @@ urlpatterns = patterns('', # nopep8
url
(
r'^heartbeat$'
,
include
(
'heartbeat.urls'
)),
url
(
r'^user_api/'
,
include
(
'user_api.urls'
)),
url
(
r'^lang_pref/'
,
include
(
'lang_pref.urls'
)),
)
# User creation and updating views
...
...
common/djangoapps/lang_pref/tests/test_views.py
View file @
ff0a6fb7
...
...
@@ -7,6 +7,7 @@ from student.tests.factories import UserFactory
from
user_api.models
import
UserPreference
from
lang_pref
import
LANGUAGE_KEY
class
TestLanguageSetting
(
TestCase
):
"""
Test setting languages
...
...
common/djangoapps/lang_pref/urls.py
View file @
ff0a6fb7
...
...
@@ -2,7 +2,7 @@
Urls for managing language preferences
"""
from
django.conf.urls
import
patterns
,
url
from
django.conf.urls
import
patterns
,
url
urlpatterns
=
patterns
(
''
,
...
...
common/djangoapps/lang_pref/views.py
View file @
ff0a6fb7
...
...
@@ -7,6 +7,7 @@ from django.http import HttpResponse, HttpResponseBadRequest
from
user_api.models
import
UserPreference
from
lang_pref
import
LANGUAGE_KEY
@login_required
def
set_language
(
request
):
"""
...
...
common/test/acceptance/tests/test_lms.py
View file @
ff0a6fb7
...
...
@@ -74,14 +74,12 @@ class LanguageTest(UniqueCourseTest):
"""
Tests that the change language functionality on the dashboard works
"""
@property
def
_changed_lang_promise
(
self
):
def
_check_func
():
text
=
self
.
dashboard_page
.
current_courses_text
return
(
len
(
text
)
>
0
,
text
)
return
Promise
(
_check_func
,
"language changed"
)
def
setUp
(
self
):
...
...
@@ -106,8 +104,10 @@ class LanguageTest(UniqueCourseTest):
self
.
dashboard_page
.
visit
()
# Change language to Dummy Esperanto
self
.
dashboard_page
.
change_language
(
self
.
test_new_lang
)
changed_text
=
fulfill
(
self
.
_changed_lang_promise
)
# We should see the dummy-language text on the page
self
.
assert
True
(
self
.
browser
.
is_text_present
(
self
.
current_courses_text
)
)
self
.
assert
In
(
self
.
current_courses_text
,
changed_text
)
def
test_language_persists
(
self
):
auto_auth_page
=
AutoAuthPage
(
self
.
browser
,
username
=
self
.
username
,
password
=
self
.
password
,
email
=
self
.
email
,
course_id
=
self
.
course_id
)
...
...
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