

def test_command_shell(self):
    inp = StringIO('print hello')
    out = StringIO()
    with patch.object(sys, 'stdin', inp):
        with patch.object(sys, 'stdout', out):
            self.app.command_shell()
    self.assertEqual(out.getvalue(), '>>> world\n>>> ')

dataset/ETHPy150Open SmartTeleMax/iktomi/tests/cli/app.py CliAppTest.test_command_shell/original