blob: 663ab68e833ea6c9b86db52a839419f09ca451a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
from mediagoblin.tools import staticdirect
from mediagoblin.tools.testing import _activate_testing
_activate_testing()
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"
|