From 37b1a2f7388cc1535de889cf19ad83411201c601 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Mon, 12 May 2014 16:34:53 -0400 Subject: [PATCH] Remove calls to loc_mapper --- cms/djangoapps/contentstore/views/tests/test_container.py | 5 ++--- cms/djangoapps/contentstore/views/tests/test_tabs.py | 3 +-- common/djangoapps/external_auth/tests/test_ssl.py | 5 +---- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/cms/djangoapps/contentstore/views/tests/test_container.py b/cms/djangoapps/contentstore/views/tests/test_container.py index 30966b124f..c3914fabb7 100644 --- a/cms/djangoapps/contentstore/views/tests/test_container.py +++ b/cms/djangoapps/contentstore/views/tests/test_container.py @@ -7,7 +7,7 @@ import json from contentstore.tests.utils import CourseTestCase from contentstore.utils import compute_publish_state, PublishState from contentstore.views.helpers import xblock_studio_url -from xmodule.modulestore.django import loc_mapper, modulestore +from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.factories import ItemFactory @@ -128,9 +128,8 @@ class ContainerViewTestCase(CourseTestCase): """ Verify that the specified xblock has the expected HTML elements for container preview """ - locator = loc_mapper().translate_location(xblock.location, published=False) publish_state = compute_publish_state(xblock) - preview_url = '/xblock/{locator}/container_preview'.format(locator=locator) + preview_url = '/xblock/{}/container_preview'.format(xblock.location) resp = self.client.get(preview_url, HTTP_ACCEPT='application/json') self.assertEqual(resp.status_code, 200) diff --git a/cms/djangoapps/contentstore/views/tests/test_tabs.py b/cms/djangoapps/contentstore/views/tests/test_tabs.py index ad17fd8365..f67f18ba63 100644 --- a/cms/djangoapps/contentstore/views/tests/test_tabs.py +++ b/cms/djangoapps/contentstore/views/tests/test_tabs.py @@ -178,8 +178,7 @@ class TabsPageTests(CourseTestCase): """ Verify that the static tab renders itself with the correct HTML """ - locator = loc_mapper().translate_location(self.test_tab.location) - preview_url = '/xblock/{locator}/student_view'.format(locator=unicode(locator)) + preview_url = '/xblock/{}/student_view'.format(self.test_tab.location) resp = self.client.get(preview_url, HTTP_ACCEPT='application/json') self.assertEqual(resp.status_code, 200) diff --git a/common/djangoapps/external_auth/tests/test_ssl.py b/common/djangoapps/external_auth/tests/test_ssl.py index 5445e5286e..ed440eb592 100644 --- a/common/djangoapps/external_auth/tests/test_ssl.py +++ b/common/djangoapps/external_auth/tests/test_ssl.py @@ -382,10 +382,7 @@ class SSLClientTest(ModuleStoreTestCase): CourseEnrollment.enroll(user, course.id) CourseStaffRole(course.id).add_users(user) - new_location = loc_mapper().translate_location( - course.location, True, True - ) - course_private_url = new_location.url_reverse('course/', '') + course_private_url = course.location.url_reverse('course/', '') self.assertFalse(SESSION_KEY in self.client.session) response = self.client.get(