diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2012-07-06 14:54:21 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2012-07-14 12:55:14 -0500 |
commit | 5377114c4d1a3e5a9f80c49f27af81470a30230c (patch) | |
tree | 36fe468b9c1041b7b97a66172c368fec9a74d599 /mediagoblin/tests | |
parent | 00eda826cb3cb694c4e9f11e799ec5e4e57323ff (diff) | |
download | mediagoblin-5377114c4d1a3e5a9f80c49f27af81470a30230c.tar.lz mediagoblin-5377114c4d1a3e5a9f80c49f27af81470a30230c.tar.xz mediagoblin-5377114c4d1a3e5a9f80c49f27af81470a30230c.zip |
Update staticdirect stuff so it can handle "domains" of staticdirection
Diffstat (limited to 'mediagoblin/tests')
-rw-r--r-- | mediagoblin/tests/test_staticdirect.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mediagoblin/tests/test_staticdirect.py b/mediagoblin/tests/test_staticdirect.py new file mode 100644 index 00000000..3a9e2fd9 --- /dev/null +++ b/mediagoblin/tests/test_staticdirect.py @@ -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" |