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
7ff3f09e
Commit
7ff3f09e
authored
Dec 12, 2014
by
Christine Lytwynec
Committed by
Zia Fazal
Apr 07, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix git_export tests
parent
20ac2727
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
cms/djangoapps/contentstore/management/commands/tests/test_git_export.py
+4
-4
No files found.
cms/djangoapps/contentstore/management/commands/tests/test_git_export.py
View file @
7ff3f09e
...
@@ -69,13 +69,13 @@ class TestGitExport(CourseTestCase):
...
@@ -69,13 +69,13 @@ class TestGitExport(CourseTestCase):
# Send bad url to get course not exported
# Send bad url to get course not exported
with
self
.
assertRaises
(
SystemExit
)
as
ex
:
with
self
.
assertRaises
(
SystemExit
)
as
ex
:
with
self
.
assertRaisesRegexp
(
CommandError
,
GitExportError
.
URL_BAD
):
with
self
.
assertRaisesRegexp
(
CommandError
,
str
(
GitExportError
.
URL_BAD
)
):
call_command
(
'git_export'
,
'foo/bar/baz'
,
'silly'
,
call_command
(
'git_export'
,
'foo/bar/baz'
,
'silly'
,
stderr
=
StringIO
.
StringIO
())
stderr
=
StringIO
.
StringIO
())
self
.
assertEqual
(
ex
.
exception
.
code
,
1
)
self
.
assertEqual
(
ex
.
exception
.
code
,
1
)
# Send bad course_id to get course not exported
# Send bad course_id to get course not exported
with
self
.
assertRaises
(
SystemExit
)
as
ex
:
with
self
.
assertRaises
(
SystemExit
)
as
ex
:
with
self
.
assertRaisesRegexp
(
CommandError
,
GitExportError
.
BAD_COURSE
):
with
self
.
assertRaisesRegexp
(
CommandError
,
str
(
GitExportError
.
BAD_COURSE
)
):
call_command
(
'git_export'
,
'foo/bar:baz'
,
'silly'
,
call_command
(
'git_export'
,
'foo/bar:baz'
,
'silly'
,
stderr
=
StringIO
.
StringIO
())
stderr
=
StringIO
.
StringIO
())
self
.
assertEqual
(
ex
.
exception
.
code
,
1
)
self
.
assertEqual
(
ex
.
exception
.
code
,
1
)
...
@@ -86,7 +86,7 @@ class TestGitExport(CourseTestCase):
...
@@ -86,7 +86,7 @@ class TestGitExport(CourseTestCase):
"""
"""
output
=
StringIO
.
StringIO
()
output
=
StringIO
.
StringIO
()
with
self
.
assertRaises
(
SystemExit
):
with
self
.
assertRaises
(
SystemExit
):
with
self
.
assertRaisesRegexp
(
CommandError
,
GitExportError
.
BAD_COURSE
):
with
self
.
assertRaisesRegexp
(
CommandError
,
str
(
GitExportError
.
BAD_COURSE
)
):
call_command
(
call_command
(
'git_export'
,
'foo/bar:baz'
,
'silly'
,
'git_export'
,
'foo/bar:baz'
,
'silly'
,
stdout
=
output
,
stderr
=
output
stdout
=
output
,
stderr
=
output
...
@@ -96,7 +96,7 @@ class TestGitExport(CourseTestCase):
...
@@ -96,7 +96,7 @@ class TestGitExport(CourseTestCase):
output
=
StringIO
.
StringIO
()
output
=
StringIO
.
StringIO
()
with
self
.
assertRaises
(
SystemExit
):
with
self
.
assertRaises
(
SystemExit
):
with
self
.
assertRaisesRegexp
(
CommandError
,
GitExportError
.
URL_BAD
):
with
self
.
assertRaisesRegexp
(
CommandError
,
str
(
GitExportError
.
URL_BAD
)
):
call_command
(
call_command
(
'git_export'
,
'foo/bar/baz'
,
'silly'
,
'git_export'
,
'foo/bar/baz'
,
'silly'
,
stdout
=
output
,
stderr
=
output
stdout
=
output
,
stderr
=
output
...
...
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