summaryrefslogtreecommitdiff
path: root/tests/test_plugin.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2018-09-25 14:11:10 -0400
committerGitHub <noreply@github.com>2018-09-25 14:11:10 -0400
commit38f070a5876e91945bfadd3fe60ddcb8b21b96c3 (patch)
tree3a85cc21da32868323060397ff55cf3c0119fa34 /tests/test_plugin.py
parentc0f283b2dc387c3fec5057370767afe7d8021960 (diff)
parentfcfa8ed840f245ac83287e27e1318b539b678bf8 (diff)
downloadcmd2-git-38f070a5876e91945bfadd3fe60ddcb8b21b96c3.tar.gz
Merge pull request #540 from python-cmd2/delete_deprecated_hooks
Deleted the hook methods which were deprecated in the previous release
Diffstat (limited to 'tests/test_plugin.py')
-rw-r--r--tests/test_plugin.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_plugin.py b/tests/test_plugin.py
index 20f2f32c..81dd7683 100644
--- a/tests/test_plugin.py
+++ b/tests/test_plugin.py
@@ -51,10 +51,10 @@ class Plugin:
# preparse hook
#
###
- def preparse(self, line: str) -> str:
+ def preparse(self, data: cmd2.plugin.PostparsingData) -> cmd2.plugin.PostparsingData:
"""Preparsing hook"""
self.called_preparse += 1
- return line
+ return data
###
#
@@ -322,6 +322,7 @@ def test_postloop_hooks(capsys):
###
def test_preparse(capsys):
app = PluggedApp()
+ app.register_postparsing_hook(app.preparse)
app.onecmd_plus_hooks('say hello')
out, err = capsys.readouterr()
assert out == 'hello\n'