Commit e687f1e7 by Ayub-khan

-Adressed all comments

parent ef70d017
...@@ -194,7 +194,7 @@ class TabsPageTests(CourseTestCase): ...@@ -194,7 +194,7 @@ class TabsPageTests(CourseTestCase):
def test_invalid_course_id(self): def test_invalid_course_id(self):
""" Asserts that Http404 is raised when the course id is not valid. """ """ Asserts that Http404 is raised when the course id is not valid. """
invalid_tab_url = reverse_course_url('tabs_handler', "/some.invalid.key/TTT/CS01/2015_T0") invalid_tab_url = reverse_course_url('tabs_handler', "/some.invalid.key/course-v1:TTT+CS01+2015_T0")
with self.assertRaises(Http404): with self.assertRaises(Http404):
self.client.get(invalid_tab_url) self.client.get(invalid_tab_url)
......
...@@ -320,7 +320,7 @@ class UsersTestCase(CourseTestCase): ...@@ -320,7 +320,7 @@ class UsersTestCase(CourseTestCase):
def test_invalid_course_id(self): def test_invalid_course_id(self):
""" Asserts that Http404 is raised when the course id is not valid. """ """ Asserts that Http404 is raised when the course id is not valid. """
wrong_url = reverse_course_url( wrong_url = reverse_course_url(
'course_team_handler', "/some.invalid.key/TTT/CS01/2015_T0", 'course_team_handler', "/some.invalid.key/course-v1:TTT+CS01+2015_T0",
kwargs={'email': self.ext_user.email} kwargs={'email': self.ext_user.email}
) )
with self.assertRaises(Http404): with self.assertRaises(Http404):
......
""" """
Tests for util.course_key_utils Tests for util.course_key_utils
""" """
import ddt
import unittest
from util.course_key_utils import course_key_from_string_or_404 from util.course_key_utils import course_key_from_string_or_404
from opaque_keys.edx.keys import CourseKey from opaque_keys.edx.keys import CourseKey
from django.http import Http404 from django.http import Http404
import ddt
import unittest
@ddt.ddt @ddt.ddt
...@@ -21,7 +21,6 @@ class TestFromStringOr404(unittest.TestCase): ...@@ -21,7 +21,6 @@ class TestFromStringOr404(unittest.TestCase):
""" """
Tests course_key_from_string_or_404 for valid split style course keys and mongo style course keys. Tests course_key_from_string_or_404 for valid split style course keys and mongo style course keys.
""" """
from nose.tools import set_trace ; set_trace()
self.assertEquals( self.assertEquals(
CourseKey.from_string(valid_course_key), CourseKey.from_string(valid_course_key),
course_key_from_string_or_404(valid_course_key) course_key_from_string_or_404(valid_course_key)
......
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