Skip to content

Commit

Permalink
Merge branch 'master' into jci/issue#35245
Browse files Browse the repository at this point in the history
  • Loading branch information
jciasenza authored Dec 9, 2024
2 parents f149e7c + 394a459 commit 76b8723
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 87 deletions.
4 changes: 2 additions & 2 deletions cms/djangoapps/contentstore/views/tests/test_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,12 +312,12 @@ def test_split_test(self):
resp = self.create_xblock(
parent_usage_key=split_test_usage_key,
category="html",
boilerplate="zooming_image.yaml",
boilerplate="latex_html.yaml",
)
self.assertEqual(resp.status_code, 200)
html, __ = self._get_container_preview(split_test_usage_key)
self.assertIn("Announcement", html)
self.assertIn("Zooming", html)
self.assertIn("LaTeX", html)

def test_split_test_edited(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion common/djangoapps/static_replace/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from xmodule.contentstore.content import StaticContent

log = logging.getLogger(__name__)
XBLOCK_STATIC_RESOURCE_PREFIX = '/static/xblock'
XBLOCK_STATIC_RESOURCE_PREFIX = '/static/xblock/'


def _url_replace_regex(prefix):
Expand Down
10 changes: 10 additions & 0 deletions common/djangoapps/static_replace/test/test_static_replace.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,16 @@ def processor(__, prefix, quote, rest): # pylint: disable=redefined-outer-name
assert process_static_urls(STATIC_SOURCE, processor) == '"test/static/file.png"'


def test_process_url_no_match_starts_with_xblock():
def processor(original, prefix, quote, rest): # pylint: disable=unused-argument, redefined-outer-name
return quote + 'test' + prefix + rest + quote
assert process_static_urls(
'"/static/xblock-file.png"',
processor,
data_dir=DATA_DIRECTORY
) == '"test/static/xblock-file.png"'


@patch('django.http.HttpRequest', autospec=True)
def test_static_urls(mock_request):
mock_request.build_absolute_uri = lambda url: 'http://' + url
Expand Down
57 changes: 0 additions & 57 deletions xmodule/templates/html/zooming_image.yaml

This file was deleted.

25 changes: 0 additions & 25 deletions xmodule/templates/test/zooming_image.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions xmodule/tests/test_resource_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class ResourceTemplatesTests(unittest.TestCase):
def test_templates(self):
expected = {
'latex_html.yaml',
'zooming_image.yaml',
'announcement.yaml',
'anon_user_id.yaml'}
got = {t['template_id'] for t in TestClass.templates()}
Expand All @@ -38,7 +37,6 @@ def test_get_custom_template(self):
def test_custom_templates(self):
expected = {
'latex_html.yaml',
'zooming_image.yaml',
'announcement.yaml',
'anon_user_id.yaml'}
got = {t['template_id'] for t in TestClassResourceTemplate.templates()}
Expand Down

0 comments on commit 76b8723

Please sign in to comment.