diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2019-10-30 22:15:37 -0400 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2019-10-30 22:15:37 -0400 |
commit | 5a58199590f06996cc741063da29ffb166026ced (patch) | |
tree | ba6cfaae945625c28934b38bf537f78a5040b567 /tests | |
parent | b3edff1e51ed6d99e5480969330afce199f23c89 (diff) | |
parent | b1873c3e6a19276417e7b3a046b48db54a2d6304 (diff) | |
download | cmd2-git-5a58199590f06996cc741063da29ffb166026ced.tar.gz |
Merge branch 'master' into set_prog
# Conflicts:
# CHANGELOG.md
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/test_history.py | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/tests/test_history.py b/tests/test_history.py index 476cdd7e..4b900030 100755 --- a/tests/test_history.py +++ b/tests/test_history.py @@ -476,9 +476,9 @@ def test_history_edit(base_app, monkeypatch): # going to call it due to the mock base_app.editor = 'fooedit' - # Mock out the edit call so we don't actually open an editor - edit_mock = mock.MagicMock(name='do_edit') - monkeypatch.setattr("cmd2.Cmd.do_edit", edit_mock) + # Mock out the _run_editor call so we don't actually open an editor + edit_mock = mock.MagicMock(name='_run_editor') + monkeypatch.setattr("cmd2.Cmd._run_editor", edit_mock) # Mock out the run_script call since the mocked edit won't produce a file run_script_mock = mock.MagicMock(name='do_run_script') @@ -590,17 +590,6 @@ def test_base_help_history(base_app): assert out == normalize(HELP_HISTORY) def test_exclude_from_history(base_app, monkeypatch): - # Set a fake editor just to make sure we have one. We aren't - # really going to call it due to the mock - base_app.editor = 'fooedit' - - # Mock out the subprocess.Popen call so we don't actually open an editor - m = mock.MagicMock(name='Popen') - monkeypatch.setattr("subprocess.Popen", m) - - # Run edit command - run_cmd(base_app, 'edit') - # Run history command run_cmd(base_app, 'history') |