aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tests/test_pluginapi.py
diff options
context:
space:
mode:
Diffstat (limited to 'mediagoblin/tests/test_pluginapi.py')
-rw-r--r--mediagoblin/tests/test_pluginapi.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/mediagoblin/tests/test_pluginapi.py b/mediagoblin/tests/test_pluginapi.py
index dbc4b7c8..4bbb9de4 100644
--- a/mediagoblin/tests/test_pluginapi.py
+++ b/mediagoblin/tests/test_pluginapi.py
@@ -284,3 +284,24 @@ def test_hook_runall():
"Hi, I'm the third"]
+@with_cleanup()
+def test_hook_transform():
+ """
+ Test the hook_transform method
+ """
+ cfg = build_config([
+ ('mediagoblin', {}, []),
+ ('plugins', {}, [
+ ('mediagoblin.tests.testplugins.callables1', {}, []),
+ ('mediagoblin.tests.testplugins.callables2', {}, []),
+ ('mediagoblin.tests.testplugins.callables3', {}, []),
+ ])
+ ])
+
+ mg_globals.app_config = cfg['mediagoblin']
+ mg_globals.global_config = cfg
+
+ setup_plugins()
+
+ assert pluginapi.hook_transform(
+ "expand_tuple", (-1, 0)) == (-1, 0, 1, 2, 3)