def test_run_pos_is_called_once(self): shell = Shell(TestShell.cmd, stdout=True) shell.run_pos = Mock() with patch('subprocess.check_output', return_value=''): shell.run() shell.run_pos.assert_called_once_with()