-Adressed all comments
This commit is contained in:
@@ -194,7 +194,7 @@ class TabsPageTests(CourseTestCase):
|
||||
|
||||
def test_invalid_course_id(self):
|
||||
""" 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):
|
||||
self.client.get(invalid_tab_url)
|
||||
|
||||
|
||||
@@ -320,7 +320,7 @@ class UsersTestCase(CourseTestCase):
|
||||
def test_invalid_course_id(self):
|
||||
""" Asserts that Http404 is raised when the course id is not valid. """
|
||||
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}
|
||||
)
|
||||
with self.assertRaises(Http404):
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
"""
|
||||
Tests for util.course_key_utils
|
||||
"""
|
||||
import ddt
|
||||
import unittest
|
||||
from util.course_key_utils import course_key_from_string_or_404
|
||||
from opaque_keys.edx.keys import CourseKey
|
||||
from django.http import Http404
|
||||
import ddt
|
||||
import unittest
|
||||
|
||||
|
||||
@ddt.ddt
|
||||
@@ -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.
|
||||
"""
|
||||
from nose.tools import set_trace ; set_trace()
|
||||
self.assertEquals(
|
||||
CourseKey.from_string(valid_course_key),
|
||||
course_key_from_string_or_404(valid_course_key)
|
||||
|
||||
Reference in New Issue
Block a user