def test_raw_static_check():
 path = '"/static/foo.png?raw"'
 assert_equals(path, replace_static_urls(path, DATA_DIRECTORY))
 text = 'text <tag a="/static/js/capa/protex/protex.nocache.js?raw"/><div class="'
 assert_equals(path, replace_static_urls(path, text))

def test_raw_static_check ( ) : path = '"/static/foo.png?raw"' assert_equals ( path , replace_static_urls ( path , DATA_DIRECTORY ) ) text = 'text <tag a="/static/js/capa/protex/protex.nocache.js?raw"/><div class="' assert_equals ( path , replace_static_urls ( path , text ) )
make sure replace_static_urls leaves alone things that end in .