Commit 19f0bf0f by stv

Fix failing forked tests

These had been failing for a while.
parent 4b88f54a
......@@ -41,7 +41,7 @@ class ChecklistTestCase(CourseTestCase):
def test_get_checklists(self):
""" Tests the get checklists method and URL expansion. """
response = self.client.get(self.checklists_url)
self.assertContains(response, "Getting Started With Studio")
self.assertContains(response, "Putting the structure in place")
# Verify expansion of action URL happened.
self.assertContains(response, 'course_team/slashes:mitX+333+Checklists_Course')
# Verify persisted checklist does NOT have expanded URL.
......@@ -63,7 +63,7 @@ class ChecklistTestCase(CourseTestCase):
def test_get_checklists_html(self):
""" Tests getting the HTML template for the checklists page). """
response = self.client.get(self.checklists_url, HTTP_ACCEPT='text/html')
self.assertContains(response, "Getting Started With Studio")
self.assertContains(response, "Putting the structure in place")
# The HTML generated will define the handler URL (for use by the Backbone model).
self.assertContains(response, self.checklists_url)
......@@ -139,8 +139,7 @@ class ChecklistTestCase(CourseTestCase):
test_expansion(self.course.checklists[0], 0, 'ManageUsers', '/course_team/slashes:mitX+333+Checklists_Course/')
test_expansion(self.course.checklists[1], 1, 'CourseOutline', '/course/slashes:mitX+333+Checklists_Course')
raise Exception('FUNK CHECKLIST {}'.format(self.course.checklists[2]))
test_expansion(self.course.checklists[2], 0, 'http://help.edge.edx.org/', 'http://help.edge.edx.org/')
test_expansion(self.course.checklists[2], 0, 'http://www.youtube.com', 'http://www.youtube.com')
def get_first_item(checklist):
......
......@@ -920,23 +920,23 @@ class CapaModuleTest(unittest.TestCase):
# more attempts than allowed.
attempts = random.randint(1, 10)
module = CapaFactory.create(attempts=attempts - 1, max_attempts=attempts)
self.assertEqual(module.check_button_name(), "Submit")
self.assertEqual(module.check_button_name(), "Final Submit")
module = CapaFactory.create(attempts=attempts, max_attempts=attempts)
self.assertEqual(module.check_button_name(), "Submit")
self.assertEqual(module.check_button_name(), "Final Submit")
module = CapaFactory.create(attempts=attempts + 1, max_attempts=attempts)
self.assertEqual(module.check_button_name(), "Submit")
self.assertEqual(module.check_button_name(), "Final Submit")
module = CapaFactory.create(attempts=attempts - 2, max_attempts=attempts)
self.assertEqual(module.check_button_name(), "Final Submit")
self.assertEqual(module.check_button_name(), "Submit")
module = CapaFactory.create(attempts=attempts - 3, max_attempts=attempts)
self.assertEqual(module.check_button_name(), "Final Submit")
self.assertEqual(module.check_button_name(), "Submit")
# If no limit on attempts
module = CapaFactory.create(attempts=attempts - 3)
self.assertEqual(module.check_button_name(), "Final Submit")
self.assertEqual(module.check_button_name(), "Submit")
module = CapaFactory.create(attempts=0)
self.assertEqual(module.check_button_name(), "Submit")
......
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