aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tests/test_storage.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-04-09 11:45:38 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-04-09 11:45:38 -0500
commit770c12be8d29ab0d6960bbc20ca5c58363da753d (patch)
tree5fecf906620cfd6b23975762972310f851acf674 /mediagoblin/tests/test_storage.py
parenta6b378ef4d8a30eb1c832ea131167c8f69fc7d34 (diff)
downloadmediagoblin-770c12be8d29ab0d6960bbc20ca5c58363da753d.tar.lz
mediagoblin-770c12be8d29ab0d6960bbc20ca5c58363da753d.tar.xz
mediagoblin-770c12be8d29ab0d6960bbc20ca5c58363da753d.zip
Raise a specific error if a filename component can't be resolved into anything.
Diffstat (limited to 'mediagoblin/tests/test_storage.py')
-rw-r--r--mediagoblin/tests/test_storage.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/mediagoblin/tests/test_storage.py b/mediagoblin/tests/test_storage.py
index b7da467c..cdcddf09 100644
--- a/mediagoblin/tests/test_storage.py
+++ b/mediagoblin/tests/test_storage.py
@@ -30,3 +30,12 @@ def test_clean_listy_filepath():
expected = [u'etc', u'passwd']
assert storage.clean_listy_filepath(
['../../../etc/', 'passwd']) == expected
+
+ try:
+ storage.clean_listy_filepath(
+ ['../../', 'linooks.jpg'])
+ except storage.InvalidFilepath:
+ # Yes, this error should be raise
+ pass
+ else:
+ assert "success" == "failboat"