diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2013-04-19 16:28:41 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2013-04-19 16:28:41 -0500 |
commit | a0e7699a45582d475d293350bcd2ba10ec5a8c43 (patch) | |
tree | 47036a30de54ba94680f74e78d3cceb41c822fd4 /mediagoblin/tests/test_pluginapi.py | |
parent | 234ddad607fa8d38e01c9ff1386fc32427c99d8f (diff) | |
download | mediagoblin-a0e7699a45582d475d293350bcd2ba10ec5a8c43.tar.lz mediagoblin-a0e7699a45582d475d293350bcd2ba10ec5a8c43.tar.xz mediagoblin-a0e7699a45582d475d293350bcd2ba10ec5a8c43.zip |
Added new tests to test hook_transform()
Diffstat (limited to 'mediagoblin/tests/test_pluginapi.py')
-rw-r--r-- | mediagoblin/tests/test_pluginapi.py | 21 |
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) |