diff --git a/openedx/core/djangoapps/user_api/tests/test_helpers.py b/openedx/core/djangoapps/user_api/tests/test_helpers.py index 2e4cc66fb0..d5babff60c 100644 --- a/openedx/core/djangoapps/user_api/tests/test_helpers.py +++ b/openedx/core/djangoapps/user_api/tests/test_helpers.py @@ -60,7 +60,7 @@ class InterceptErrorsTest(TestCase): u"keyword arguments '{{'raise_error': }}' " u"from File \"{}\", line XXX, in test_logs_errors\n" u" intercepted_function(raise_error=FakeInputException): FakeInputException()" - ).format(exception, __file__) + ).format(exception, __file__.rstrip('c')) # Verify that the raised exception has the error message try: