From 5fa38cb59ea721f5c3b94d7673836840fa52a652 Mon Sep 17 00:00:00 2001 From: Adam Palay Date: Fri, 19 Sep 2014 09:12:55 -0400 Subject: [PATCH] add simple help-modal-test --- lms/tests.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lms/tests.py b/lms/tests.py index c6c7be64e9..846e888675 100644 --- a/lms/tests.py +++ b/lms/tests.py @@ -1,11 +1,15 @@ """Tests for the lms module itself.""" import mimetypes +from mock import patch from django.test import TestCase +from django.test.utils import override_settings +from django.core.urlresolvers import reverse from edxmako import add_lookup, LOOKUP from lms import startup +from xmodule.modulestore.tests.factories import CourseFactory class LmsModuleTests(TestCase): @@ -36,3 +40,19 @@ class TemplateLookupTests(TestCase): startup.enable_microsites() directories = LOOKUP['main'].directories self.assertEqual(len([dir for dir in directories if 'external_module' in dir]), 1) + + +@patch.dict('django.conf.settings.FEATURES', {'ENABLE_FEEDBACK_SUBMISSION': True}) +class HelpModalTests(TestCase): + """Tests for the help modal""" + def setUp(self): + self.course = CourseFactory.create() + + def test_simple_test(self): + """ + Simple test to make sure that you don't get a 500 error when the modal + is enabled. + """ + url = reverse('info', args=[self.course.id.to_deprecated_string()]) + resp = self.client.get(url) + self.assertEqual(resp.status_code, 200)