Commit 86637d7f by Robert Raposa

Various test fixes.

parent 2e8c68e6
...@@ -65,7 +65,7 @@ class TestCourseHomePage(SharedModuleStoreTestCase): ...@@ -65,7 +65,7 @@ class TestCourseHomePage(SharedModuleStoreTestCase):
get_course_in_cache(self.course.id) get_course_in_cache(self.course.id)
# Fetch the view and verify the query counts # Fetch the view and verify the query counts
with self.assertNumQueries(36): with self.assertNumQueries(35):
with check_mongo_calls(3): with check_mongo_calls(3):
url = course_home_url(self.course) url = course_home_url(self.course)
self.client.get(url) self.client.get(url)
...@@ -4,6 +4,7 @@ Tests for the Course Outline view and supporting views. ...@@ -4,6 +4,7 @@ Tests for the Course Outline view and supporting views.
import datetime import datetime
import ddt import ddt
import json import json
from markupsafe import escape
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from pyquery import PyQuery as pq from pyquery import PyQuery as pq
...@@ -243,4 +244,4 @@ class TestEmptyCourseOutlinePage(SharedModuleStoreTestCase): ...@@ -243,4 +244,4 @@ class TestEmptyCourseOutlinePage(SharedModuleStoreTestCase):
url = course_home_url(course) url = course_home_url(course)
response = self.client.get(url) response = self.client.get(url)
self.assertEqual(response.status_code, 200) self.assertEqual(response.status_code, 200)
self.assertContains(response, expected_text) self.assertContains(response, escape(expected_text))
...@@ -84,7 +84,7 @@ class TestCourseUpdatesPage(SharedModuleStoreTestCase): ...@@ -84,7 +84,7 @@ class TestCourseUpdatesPage(SharedModuleStoreTestCase):
def test_queries(self): def test_queries(self):
# Fetch the view and verify that the query counts haven't changed # Fetch the view and verify that the query counts haven't changed
with self.assertNumQueries(34): with self.assertNumQueries(32):
with check_mongo_calls(4): with check_mongo_calls(4):
url = course_updates_url(self.course) url = course_updates_url(self.course)
self.client.get(url) self.client.get(url)
...@@ -191,7 +191,7 @@ class SystemTestSuite(NoseTestSuite): ...@@ -191,7 +191,7 @@ class SystemTestSuite(NoseTestSuite):
if self.root == 'lms': if self.root == 'lms':
default_test_id += " {system}/tests.py" default_test_id += " {system}/tests.py"
default_test_id += " openedx/core/djangolib/*" default_test_id += " openedx/core/djangolib/*"
default_test_id += " openedx/features/*" default_test_id += " openedx/features"
return default_test_id.format(system=self.root) return default_test_id.format(system=self.root)
......
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