Update staticdirect stuff so it can handle "domains" of staticdirection
This commit is contained in:
9
mediagoblin/tests/test_staticdirect.py
Normal file
9
mediagoblin/tests/test_staticdirect.py
Normal file
@@ -0,0 +1,9 @@
|
||||
from mediagoblin.tools import staticdirect
|
||||
|
||||
def test_staticdirect():
|
||||
sdirect = staticdirect.StaticDirect(
|
||||
{None: "/static/",
|
||||
"theme": "http://example.org/themestatic"})
|
||||
assert sdirect("css/monkeys.css") == "/static/css/monkeys.css"
|
||||
assert sdirect("images/lollerskate.png", "theme") == \
|
||||
"http://example.org/themestatic/images/lollerskate.png"
|
||||
Reference in New Issue
Block a user