Commit 779f8656 by Victor Shnayder

remove check-for-404 hack from tests now that we get real 404s

parent 814cd560
...@@ -222,16 +222,9 @@ class PageLoader(ActivateLoginTestCase): ...@@ -222,16 +222,9 @@ class PageLoader(ActivateLoginTestCase):
handling. handling.
""" """
resp = self.client.get(url) resp = self.client.get(url)
# HACK: workaround the bug that returns 200 instead of 404. self.assertEqual(resp.status_code, code,
# TODO (vshnayder): once we're returning 404s, get rid of this if. "got code {0} for url '{1}'. Expected code {2}"
if code != 404: .format(resp.status_code, url, code))
self.assertEqual(resp.status_code, code)
# And 'page not found' shouldn't be in the returned page
self.assertTrue(resp.content.lower().find('page not found') == -1)
else:
# look for "page not found" instead of the status code
#print resp.content
self.assertTrue(resp.content.lower().find('page not found') != -1)
def check_pages_load(self, course_name, data_dir, modstore): def check_pages_load(self, course_name, data_dir, modstore):
......
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