Ran pyupgrade on lms/djangoapps/instructor_analytics Ran pyugprade on lms/djangoapps/instructor_task Ran pyupgrade on lms/djangoapps/learner_dashboard
26 lines
572 B
Python
26 lines
572 B
Python
"""
|
|
Unit test module covering utils module
|
|
"""
|
|
|
|
|
|
import ddt
|
|
from django.test import TestCase
|
|
|
|
from lms.djangoapps.learner_dashboard import utils
|
|
|
|
|
|
@ddt.ddt
|
|
class TestUtils(TestCase):
|
|
"""
|
|
The test case class covering the all the utils functions
|
|
"""
|
|
|
|
@ddt.data('path1/', '/path1/path2/', '/', '')
|
|
def test_strip_course_id(self, path):
|
|
"""
|
|
Test to make sure the function 'strip_course_id'
|
|
handles various url input
|
|
"""
|
|
actual = utils.strip_course_id(path + str(utils.FAKE_COURSE_KEY))
|
|
assert actual == path
|