Commit 0bce5569 by Christine Lytwynec

Merge pull request #6238 from edx/clytwynec/fix_failing_git_export_tests

fix git_export tests
parents a63013c2 b9668acb
......@@ -69,13 +69,13 @@ class TestGitExport(CourseTestCase):
# Send bad url to get course not exported
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',
stderr=StringIO.StringIO())
self.assertEqual(ex.exception.code, 1)
# Send bad course_id to get course not exported
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',
stderr=StringIO.StringIO())
self.assertEqual(ex.exception.code, 1)
......@@ -86,7 +86,7 @@ class TestGitExport(CourseTestCase):
"""
output = StringIO.StringIO()
with self.assertRaises(SystemExit):
with self.assertRaisesRegexp(CommandError, GitExportError.BAD_COURSE):
with self.assertRaisesRegexp(CommandError, str(GitExportError.BAD_COURSE)):
call_command(
'git_export', 'foo/bar:baz', 'silly',
stdout=output, stderr=output
......@@ -96,7 +96,7 @@ class TestGitExport(CourseTestCase):
output = StringIO.StringIO()
with self.assertRaises(SystemExit):
with self.assertRaisesRegexp(CommandError, GitExportError.URL_BAD):
with self.assertRaisesRegexp(CommandError, str(GitExportError.URL_BAD)):
call_command(
'git_export', 'foo/bar/baz', 'silly',
stdout=output, stderr=output
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment