mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
tests: add explicit 'js_rewrite_location: all' rule for testing all-rewrite (as not default anymore)
This commit is contained in:
parent
a3c8698cc3
commit
6bf6a02868
@ -71,7 +71,7 @@ def test_local_1():
|
||||
status_headers, buff = get_rewritten(get_test_dir() + 'text_content/sample.html',
|
||||
urlrewriter,
|
||||
head_insert_func,
|
||||
'com,example,test)/')
|
||||
'example,example,test,all)/')
|
||||
|
||||
# wombat insert added
|
||||
assert '<head><script src="/static/__pywb/wombat.js"> </script>' in buff, buff
|
||||
@ -188,7 +188,7 @@ def test_local_unclosed_script():
|
||||
status_headers, buff = get_rewritten(get_test_dir() + 'text_content/sample_unclosed_script.html',
|
||||
urlrewriter,
|
||||
head_insert_func,
|
||||
'com,example,test)/')
|
||||
'example,example,test,all)/')
|
||||
|
||||
# wombat insert added
|
||||
assert '<head><script src="/static/__pywb/wombat.js"> </script>' in buff, buff
|
||||
|
@ -292,6 +292,12 @@ rules:
|
||||
# testing rules -- not for valid domain
|
||||
#=================================================================
|
||||
# this rule block is a non-existent prefix merely for testing
|
||||
|
||||
- url_prefix: 'example,example,test,all)/'
|
||||
|
||||
rewrite:
|
||||
js_rewrite_location: all
|
||||
|
||||
- url_prefix: 'example,example,test,loconly)/'
|
||||
|
||||
rewrite:
|
||||
|
Loading…
x
Reference in New Issue
Block a user