summaryrefslogtreecommitdiff
path: root/tests/test_cmd2.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2017-07-02 12:03:53 -0400
committerGitHub <noreply@github.com>2017-07-02 12:03:53 -0400
commit02f234fc6af3e5c2d1434f1a8d52f808ff795dd4 (patch)
treea4c7489d7d2f96a588b2d262f844038e9414acbd /tests/test_cmd2.py
parent26743a702afa42ff199614def9f7c5eb04308f76 (diff)
parent91fc975ba2bf0414624aa9c263ddf441beadfa3d (diff)
downloadcmd2-git-02f234fc6af3e5c2d1434f1a8d52f808ff795dd4.tar.gz
Merge pull request #163 from python-cmd2/refactor_shell
Refactor shell command
Diffstat (limited to 'tests/test_cmd2.py')
-rw-r--r--tests/test_cmd2.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py
index 592e6af2..9dd2697b 100644
--- a/tests/test_cmd2.py
+++ b/tests/test_cmd2.py
@@ -103,12 +103,10 @@ To enable full traceback, run the following command: 'set debug true'
def test_base_shell(base_app, monkeypatch):
m = mock.Mock()
- monkeypatch.setattr("os.system", m)
+ monkeypatch.setattr("subprocess.Popen", m)
out = run_cmd(base_app, 'shell echo a')
assert out == []
assert m.called
- m.assert_called_with('echo a')
-
def test_base_py(base_app, capsys):
run_cmd(base_app, 'py qqq=3')