File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 11import unittest
22from unittest .mock import Mock
3+ import xml
34from mock import patch
45import re
56from lxml import etree
@@ -98,7 +99,11 @@ def test_static_urls_conversion(self):
9899 Test static urls are processed to absolute if
99100 `absolute_urls` is set
100101 """
101- relative_url = self .image_explorer_block ._replace_relative_static_urls (self .image_url )
102+ xmltree = etree .fromstring (self .image_explorer_xml )
103+ description = self .image_explorer_block ._inner_content (
104+ xmltree .find ('description' ), absolute_urls = True
105+ )
106+ relative_url = etree .HTML (description ).find ('.//img' ).get ('src' )
102107 self .assertEqual (relative_url , self .processed_absolute_url )
103108
104109 def test_student_view_multi_device_support (self ):
You can’t perform that action at this time.
0 commit comments