Commit 091a6530 by Jason Bau

Fix some tests on edx-west

parent 20892e1f
......@@ -32,15 +32,6 @@ class AnonymousIndexPageTest(ModuleStoreTestCase):
self.store.save_xmodule(self.course)
@override_settings(MITX_FEATURES=MITX_FEATURES_WITH_STARTDATE)
def test_none_user_index_access_with_startdate_fails(self):
"""
This was a "before" test for a bugfix. If someone fixes the bug another way in the future
and this test begins failing (but the other two pass), then feel free to delete this test.
"""
with self.assertRaisesRegexp(AttributeError, "'NoneType' object has no attribute 'is_authenticated'"):
student.views.index(self.factory.get('/'), user=None) # pylint: disable=E1101
@override_settings(MITX_FEATURES=MITX_FEATURES_WITH_STARTDATE)
def test_anon_user_with_startdate_index(self):
response = self.client.get('/')
self.assertEqual(response.status_code, 200)
......
......@@ -26,11 +26,12 @@ class TestInstructorDashboardEmailView(ModuleStoreTestCase):
instructor = AdminFactory.create()
self.client.login(username=instructor.username, password="test")
@patch.dict(settings.MITX_FEATURES, {'ENABLE_INSTRUCTOR_EMAIL': True})
@patch.dict(settings.MITX_FEATURES, {'ENABLE_INSTRUCTOR_EMAIL': True, 'REQUIRE_COURSE_EMAIL_AUTH': False})
def test_email_flag_true(self):
response = self.client.get(reverse('instructor_dashboard',
kwargs={'course_id': self.course.id}))
email_link = '<a href="#" onclick="goto(\'Email\')" class="None">Email</a>'
print(response.content)
self.assertTrue(email_link in response.content)
session = self.client.session
......
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