Commit c651642d by Martyn James Committed by Jonathan Piacenti

slashes: formatted ids removed

parent 46675ffb
......@@ -895,9 +895,6 @@ class GroupsApiTests(ModuleStoreTestCase):
response = self.do_post(self.base_groups_uri, data)
self.assertEqual(response.status_code, 201)
test_uri = response.data['uri'] + '/courses'
data = {'course_id': "slashes:invalid+course+id"}
response = self.do_post(test_uri, data)
self.assertEqual(response.status_code, 404)
data = {'course_id': "invalid/course/id"}
response = self.do_post(test_uri, data)
self.assertEqual(response.status_code, 404)
......
......@@ -757,7 +757,7 @@ class UsersApiTests(ModuleStoreTestCase):
response = self.do_post(test_uri, data)
user_id = response.data['id']
test_uri = '{}/{}/courses'.format(test_uri, str(user_id))
data = {'course_id': 'slashes:234asdfapsdf+2sdfs+sdf'}
data = {'course_id': '234asdfapsdf/2sdfs/sdf'}
response = self.do_post(test_uri, data)
self.assertEqual(response.status_code, 404)
data = {'course_id': 'really-invalid-course-id-oh-boy-watch-out'}
......@@ -1081,7 +1081,7 @@ class UsersApiTests(ModuleStoreTestCase):
self.assertEqual(response.status_code, 204)
def test_user_course_grades_course_not_found(self):
test_uri = '{}/{}/courses/slashes:some+unknown+course/grades'.format(self.users_base_uri, self.user.id)
test_uri = '{}/{}/courses/some/unknown/course/grades'.format(self.users_base_uri, self.user.id)
response = self.do_get(test_uri)
self.assertEqual(response.status_code, 404)
......
......@@ -28,7 +28,7 @@ class Command(BaseCommand):
"--course_ids",
dest="course_ids",
help="List of courses for which to generate grades",
metavar="slashes:first+course+id,slashes:second+course+id"
metavar="first/course/id,second/course/id"
),
make_option(
"-u",
......
......@@ -136,7 +136,7 @@ class GenerateGradebookEntriesTests(ModuleStoreTestCase):
Test the gradebook entry generator
"""
# Set up the command context
course_ids = '{},slashes:bogus+course+id'.format(self.course.id)
course_ids = '{},bogus/course/id'.format(self.course.id)
user_ids = '{}'.format(self.users[0].id)
current_entries = StudentGradebook.objects.all()
self.assertEqual(len(current_entries), 0)
......
......@@ -29,7 +29,7 @@ class Command(BaseCommand):
"--course_ids",
dest="course_ids",
help="List of courses for which to generate progress",
metavar="slashes:first+course+id,slashes:second+course+id"
metavar="first/course/id,second/course/id"
),
make_option(
"-u",
......
......@@ -106,7 +106,7 @@ class GenerateProgressEntriesTests(ModuleStoreTestCase):
Test the progress entry generator
"""
# Set up the command context
course_ids = '{},slashes:bogus+course+id'.format(self.course.id)
course_ids = '{},bogus/course/id'.format(self.course.id)
user_ids = '{}'.format(self.users[0].id)
current_entries = StudentProgress.objects.all()
self.assertEqual(len(current_entries), 0)
......
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