Commit 37b1a2f7 by Calen Pennington

Remove calls to loc_mapper

parent a4df0e15
...@@ -7,7 +7,7 @@ import json ...@@ -7,7 +7,7 @@ import json
from contentstore.tests.utils import CourseTestCase from contentstore.tests.utils import CourseTestCase
from contentstore.utils import compute_publish_state, PublishState from contentstore.utils import compute_publish_state, PublishState
from contentstore.views.helpers import xblock_studio_url 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 from xmodule.modulestore.tests.factories import ItemFactory
...@@ -128,9 +128,8 @@ class ContainerViewTestCase(CourseTestCase): ...@@ -128,9 +128,8 @@ class ContainerViewTestCase(CourseTestCase):
""" """
Verify that the specified xblock has the expected HTML elements for container preview 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) 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') resp = self.client.get(preview_url, HTTP_ACCEPT='application/json')
self.assertEqual(resp.status_code, 200) self.assertEqual(resp.status_code, 200)
......
...@@ -178,8 +178,7 @@ class TabsPageTests(CourseTestCase): ...@@ -178,8 +178,7 @@ class TabsPageTests(CourseTestCase):
""" """
Verify that the static tab renders itself with the correct HTML Verify that the static tab renders itself with the correct HTML
""" """
locator = loc_mapper().translate_location(self.test_tab.location) preview_url = '/xblock/{}/student_view'.format(self.test_tab.location)
preview_url = '/xblock/{locator}/student_view'.format(locator=unicode(locator))
resp = self.client.get(preview_url, HTTP_ACCEPT='application/json') resp = self.client.get(preview_url, HTTP_ACCEPT='application/json')
self.assertEqual(resp.status_code, 200) self.assertEqual(resp.status_code, 200)
......
...@@ -382,10 +382,7 @@ class SSLClientTest(ModuleStoreTestCase): ...@@ -382,10 +382,7 @@ class SSLClientTest(ModuleStoreTestCase):
CourseEnrollment.enroll(user, course.id) CourseEnrollment.enroll(user, course.id)
CourseStaffRole(course.id).add_users(user) CourseStaffRole(course.id).add_users(user)
new_location = loc_mapper().translate_location( course_private_url = course.location.url_reverse('course/', '')
course.location, True, True
)
course_private_url = new_location.url_reverse('course/', '')
self.assertFalse(SESSION_KEY in self.client.session) self.assertFalse(SESSION_KEY in self.client.session)
response = self.client.get( response = self.client.get(
......
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