diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2013-04-10 17:36:21 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2013-04-10 17:36:21 -0500 |
commit | cdc821eb743729fe81dea573ef71091b777301c3 (patch) | |
tree | 8d64b211e7e1dc17c82b935eba525dee13b89d91 /mediagoblin/tests/test_pluginapi.py | |
parent | 70c061955c56d62956d707a0828ca2f1dc059aad (diff) | |
download | mediagoblin-cdc821eb743729fe81dea573ef71091b777301c3.tar.lz mediagoblin-cdc821eb743729fe81dea573ef71091b777301c3.tar.xz mediagoblin-cdc821eb743729fe81dea573ef71091b777301c3.zip |
callable hook convenience functions.. now work, and with tests!
- Added three "callables" test plugins.
- updated callable_runone to check for unhandled_okay in the kwargs
dict.
All passing!
Diffstat (limited to 'mediagoblin/tests/test_pluginapi.py')
-rw-r--r-- | mediagoblin/tests/test_pluginapi.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mediagoblin/tests/test_pluginapi.py b/mediagoblin/tests/test_pluginapi.py index 4381859d..d40a5081 100644 --- a/mediagoblin/tests/test_pluginapi.py +++ b/mediagoblin/tests/test_pluginapi.py @@ -218,14 +218,14 @@ def test_callable_runone(): # Multiple provided, go with the first! call_log = [] assert pluginapi.callable_runone( - "multi_handle", call_log) is "the first returns" + "multi_handle", call_log) == "the first returns" assert call_log == ["Hi, I'm the first"] # Multiple provided, one has CantHandleIt call_log = [] assert pluginapi.callable_runone( "multi_handle_with_canthandle", - call_log) is "the second returns" + call_log) == "the second returns" assert call_log == ["Hi, I'm the second"] @@ -251,7 +251,7 @@ def test_callable_runall(): # Just one hook, check results call_log = [] assert pluginapi.callable_runall( - "just_one", call_log) == ["Called just once"] + "just_one", call_log) == ["Called just once", None, None] assert call_log == ["expect this one call"] # None provided, check results |