From f7a36aae6444dc284f878754973c6b748317a28b Mon Sep 17 00:00:00 2001 From: bmedx Date: Fri, 5 Jan 2018 10:41:07 -0500 Subject: [PATCH] Small fixes to LMS unit 2 failures in Django 1.11 tests --- openedx/core/djangoapps/credit/email_utils.py | 2 +- openedx/core/lib/api/tests/test_authentication.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openedx/core/djangoapps/credit/email_utils.py b/openedx/core/djangoapps/credit/email_utils.py index 99670b0634..a674e3edb8 100644 --- a/openedx/core/djangoapps/credit/email_utils.py +++ b/openedx/core/djangoapps/credit/email_utils.py @@ -125,7 +125,7 @@ def send_credit_notifications(username, course_key): to_address = user.email # send the root email message - msg = EmailMessage(subject, None, from_address, [to_address]) + msg = EmailMessage(subject, '', from_address, [to_address]) msg.attach(notification_msg) msg.send() diff --git a/openedx/core/lib/api/tests/test_authentication.py b/openedx/core/lib/api/tests/test_authentication.py index a5f5049294..b4d91469ee 100644 --- a/openedx/core/lib/api/tests/test_authentication.py +++ b/openedx/core/lib/api/tests/test_authentication.py @@ -18,6 +18,7 @@ from django.conf.urls import include, url from django.contrib.auth.models import User from django.http import HttpResponse from django.test import TestCase +from django.test.utils import override_settings from django.utils.http import urlencode from nose.plugins.attrib import attr from oauth2_provider import models as dot_models @@ -76,10 +77,9 @@ urlpatterns = [ @ddt.ddt @unittest.skipUnless(settings.FEATURES.get("ENABLE_OAUTH2_PROVIDER"), "OAuth2 not enabled") @pytest.mark.django111_expected_failure +@override_settings(ROOT_URLCONF=__name__) class OAuth2Tests(TestCase): """OAuth 2.0 authentication""" - urls = 'openedx.core.lib.api.tests.test_authentication' - def setUp(self): super(OAuth2Tests, self).setUp() self.dop_adapter = adapters.DOPAdapter()