Remove calls to loc_mapper
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user