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
26f13390
Commit
26f13390
authored
Mar 26, 2014
by
Carson Gee
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3083 from carsongee/cg/git_export_lazy_translation_fix
Properly get lazily translated exception message
parents
97f30aae
2c03c639
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletions
+11
-1
cms/djangoapps/contentstore/tests/test_export_git.py
+10
-0
cms/djangoapps/contentstore/views/export_git.py
+1
-1
No files found.
cms/djangoapps/contentstore/tests/test_export_git.py
View file @
26f13390
...
...
@@ -76,6 +76,16 @@ class TestExportGit(CourseTestCase):
response
=
self
.
client
.
get
(
'{}?action=push'
.
format
(
self
.
test_url
))
self
.
assertIn
(
'Export Failed:'
,
response
.
content
)
def
test_exception_translation
(
self
):
"""
Regression test for making sure errors are properly stringified
"""
self
.
course_module
.
giturl
=
'foobar'
get_modulestore
(
self
.
course_module
.
location
)
.
update_item
(
self
.
course_module
)
response
=
self
.
client
.
get
(
'{}?action=push'
.
format
(
self
.
test_url
))
self
.
assertNotIn
(
'django.utils.functional.__proxy__'
,
response
.
content
)
def
test_course_export_success
(
self
):
"""
Test successful course export response.
...
...
cms/djangoapps/contentstore/views/export_git.py
View file @
26f13390
...
...
@@ -45,7 +45,7 @@ def export_git(request, org, course, name):
msg
=
_
(
'Course successfully exported to git repository'
)
except
git_export_utils
.
GitExportError
as
ex
:
failed
=
True
msg
=
str
(
ex
)
msg
=
unicode
(
ex
)
return
render_to_response
(
'export_git.html'
,
{
'context_course'
:
course_module
,
...
...
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