Example #1
0
 def test_multiple_image_urls_in_one_string_converted(self):
     url_string = "A string with http://example.com/cat_pics.JPEG http://example.com/cat_pics2.gif"
     expected_string = "A string with /content/assessment/khan/cat/cat_pics.JPEG /content/assessment/khan/cat/cat_pics2.gif"
     assert expected_string == localize_image_urls(
         {"item_data": url_string})["item_data"]
 def test_multiple_image_urls_in_one_string_converted(self):
     url_string = "A string with http://example.com/cat_pics.JPEG http://example.com/cat_pics2.gif"
     expected_string = "A string with /content/assessment/khan/cat/cat_pics.JPEG /content/assessment/khan/cat/cat_pics2.gif"
     assert expected_string == localize_image_urls({"item_data": url_string})["item_data"]