Fixed some isinstance errors with opaque-keys

This commit is contained in:
Mat Peterson
2014-06-30 17:08:38 +00:00
committed by Diana Huang
parent aee47b44df
commit 4f6088cbd1
19 changed files with 65 additions and 49 deletions

View File

@@ -438,12 +438,15 @@ class ImportTestCase(BaseCourseTestCase):
print("course errors:")
# Expect to find an error/exception about characters in "®esources"
expect = "Invalid characters"
expect = "UnicodeEncodeError"
errors = [
(msg.encode("utf-8"), err.encode("utf-8"))
for msg, err
in modulestore.get_course_errors(course.id)
]
for msg, err in errors:
print("msg: " + str(msg))
print("err: " + str(err))
self.assertTrue(any(
expect in msg or expect in err