diff --git a/cms/envs/test.py b/cms/envs/test.py index 5d35605439..166af8268c 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -40,6 +40,15 @@ from lms.envs.test import ( REGISTRATION_EXTRA_FIELDS, ) +# Add some host names used in assorted tests +ALLOWED_HOSTS = [ + 'localhost', + 'logistration.testserver', + '.testserver.fake', + 'test-site.testserver', + 'testserver.fakeother', +] + # mongo connection settings MONGO_PORT_NUM = int(os.environ.get('EDXAPP_TEST_MONGO_PORT', '27017')) MONGO_HOST = os.environ.get('EDXAPP_TEST_MONGO_HOST', 'localhost') diff --git a/lms/djangoapps/branding/tests/test_page.py b/lms/djangoapps/branding/tests/test_page.py index 16fe8fe58f..888d26e35e 100644 --- a/lms/djangoapps/branding/tests/test_page.py +++ b/lms/djangoapps/branding/tests/test_page.py @@ -3,7 +3,6 @@ Tests for branding page """ import datetime -import pytest from django.conf import settings from django.contrib.auth.models import AnonymousUser from django.core.urlresolvers import reverse @@ -292,7 +291,6 @@ class IndexPageCourseCardsSortingTests(ModuleStoreTestCase): @attr(shard=1) -@pytest.mark.django111_expected_failure class IndexPageProgramsTests(SiteMixin, ModuleStoreTestCase): """ Tests for Programs List in Marketing Pages. diff --git a/lms/djangoapps/certificates/tests/test_views.py b/lms/djangoapps/certificates/tests/test_views.py index bf73b13d0c..b99e3c8444 100644 --- a/lms/djangoapps/certificates/tests/test_views.py +++ b/lms/djangoapps/certificates/tests/test_views.py @@ -5,7 +5,6 @@ from uuid import uuid4 import ddt import datetime -import pytest from django.conf import settings from django.core.cache import cache from django.core.urlresolvers import reverse @@ -261,7 +260,6 @@ class MicrositeCertificatesViewsTests(ModuleStoreTestCase): self.store.update_item(self.course, self.user.id) @override_settings(FEATURES=FEATURES_WITH_CERTS_ENABLED) - @pytest.mark.django111_expected_failure def test_html_view_for_microsite(self): test_configuration_string = """{ "default": { @@ -311,7 +309,6 @@ class MicrositeCertificatesViewsTests(ModuleStoreTestCase): self.assertIn('Microsite title', response.content) @override_settings(FEATURES=FEATURES_WITH_CERTS_ENABLED) - @pytest.mark.django111_expected_failure def test_html_view_microsite_configuration_missing(self): test_configuration_string = """{ "default": { diff --git a/lms/djangoapps/certificates/tests/test_webview_views.py b/lms/djangoapps/certificates/tests/test_webview_views.py index cfae554322..bb4f28d358 100644 --- a/lms/djangoapps/certificates/tests/test_webview_views.py +++ b/lms/djangoapps/certificates/tests/test_webview_views.py @@ -7,7 +7,6 @@ from collections import OrderedDict from urllib import urlencode from uuid import uuid4 -import pytest from django.conf import settings from django.core.urlresolvers import reverse from django.test.client import Client, RequestFactory @@ -243,7 +242,6 @@ class CommonCertificatesTestCase(ModuleStoreTestCase): @attr(shard=1) @ddt.ddt -@pytest.mark.django111_expected_failure class CertificatesViewsTests(CommonCertificatesTestCase): """ Tests for the certificates web/html views diff --git a/lms/djangoapps/courseware/tests/test_microsites.py b/lms/djangoapps/courseware/tests/test_microsites.py index e6113bfb8b..d1017f6757 100644 --- a/lms/djangoapps/courseware/tests/test_microsites.py +++ b/lms/djangoapps/courseware/tests/test_microsites.py @@ -19,7 +19,6 @@ from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory @attr(shard=1) -@pytest.mark.django111_expected_failure class TestSites(SharedModuleStoreTestCase, LoginEnrollmentTestCase): """ This is testing of the Site Configuration feature @@ -136,6 +135,7 @@ class TestSites(SharedModuleStoreTestCase, LoginEnrollmentTestCase): self.assertNotContains(resp, 'This is a Test Site footer') @override_settings(SITE_NAME=settings.MICROSITE_TEST_HOSTNAME) + @pytest.mark.django111_expected_failure def test_site_homepage_course_max(self): """ Verify that the number of courses displayed on the homepage honors diff --git a/lms/djangoapps/instructor/tests/test_api.py b/lms/djangoapps/instructor/tests/test_api.py index b3e22199f2..88f23c9af4 100644 --- a/lms/djangoapps/instructor/tests/test_api.py +++ b/lms/djangoapps/instructor/tests/test_api.py @@ -11,7 +11,6 @@ import shutil import tempfile import ddt -import pytest from boto.exception import BotoServerError from django.conf import settings from django.contrib.auth.models import User @@ -3641,7 +3640,6 @@ class TestEntranceExamInstructorAPIRegradeTask(SharedModuleStoreTestCase, LoginE @attr(shard=1) @patch('bulk_email.models.html_to_text', Mock(return_value='Mocking CourseEmail.text_message', autospec=True)) -@pytest.mark.django111_expected_failure class TestInstructorSendEmail(SiteMixin, SharedModuleStoreTestCase, LoginEnrollmentTestCase): """ Checks that only instructors have access to email endpoints, and that @@ -4527,7 +4525,6 @@ class TestCourseIssuedCertificatesData(SharedModuleStoreTestCase): @attr(shard=1) @override_settings(REGISTRATION_CODE_LENGTH=8) -@pytest.mark.django111_expected_failure class TestCourseRegistrationCodes(SharedModuleStoreTestCase): """ Test data dumps for E-commerce Course Registration Codes. diff --git a/lms/djangoapps/instructor/tests/test_ecommerce.py b/lms/djangoapps/instructor/tests/test_ecommerce.py index e45bc40116..86c28c38f5 100644 --- a/lms/djangoapps/instructor/tests/test_ecommerce.py +++ b/lms/djangoapps/instructor/tests/test_ecommerce.py @@ -4,7 +4,6 @@ Unit tests for Ecommerce feature flag in new instructor dashboard. import datetime -import pytest import pytz from django.core.urlresolvers import reverse from nose.plugins.attrib import attr @@ -19,7 +18,6 @@ from xmodule.modulestore.tests.factories import CourseFactory @attr(shard=1) -@pytest.mark.django111_expected_failure class TestECommerceDashboardViews(SiteMixin, SharedModuleStoreTestCase): """ Check for E-commerce view on the new instructor dashboard diff --git a/lms/djangoapps/shoppingcart/tests/test_views.py b/lms/djangoapps/shoppingcart/tests/test_views.py index 28553c175b..2d46cf7f4b 100644 --- a/lms/djangoapps/shoppingcart/tests/test_views.py +++ b/lms/djangoapps/shoppingcart/tests/test_views.py @@ -8,7 +8,6 @@ from decimal import Decimal from urlparse import urlparse import ddt -import pytest import pytz from django.conf import settings from django.contrib.admin.sites import AdminSite @@ -476,7 +475,6 @@ class ShoppingCartViewsTests(SharedModuleStoreTestCase, XssTestMixin): self.assertIn("Cart item quantity should not be greater than 1 when applying activation code", resp.content) @ddt.data(True, False) - @pytest.mark.django111_expected_failure def test_reg_code_uses_associated_mode(self, expired_mode): """Tests the use of reg codes on verified courses, expired or active. """ course_key = self.course_key.to_deprecated_string() @@ -489,7 +487,6 @@ class ShoppingCartViewsTests(SharedModuleStoreTestCase, XssTestMixin): self.assertIn(self.course.display_name.encode('utf-8'), resp.content) @ddt.data(True, False) - @pytest.mark.django111_expected_failure def test_reg_code_uses_unknown_mode(self, expired_mode): """Tests the use of reg codes on verified courses, expired or active. """ course_key = self.course_key.to_deprecated_string() @@ -1443,7 +1440,6 @@ class ShoppingCartViewsTests(SharedModuleStoreTestCase, XssTestMixin): } ) - @pytest.mark.django111_expected_failure def test_shopping_cart_navigation_link_not_in_microsite(self): """ Tests shopping cart link is available in navigation header if request is not from a microsite. @@ -1478,7 +1474,6 @@ class ShoppingCartViewsTests(SharedModuleStoreTestCase, XssTestMixin): self.assertEqual(resp.status_code, 200) self.assertIn('