Esempio n. 1
0
def test_banner_alternative_stream(mocked_print, repl: Riposte):
    repl.banner = "foobar"
    repl._process = mock.Mock(side_effect=StopIteration)
    repl._parse_args = mock.Mock(return_value=True)

    repl.run()

    mocked_print.assert_not_called()
Esempio n. 2
0
def test_banner(mocked_print, repl: Riposte):
    repl.banner = "foobar"
    repl._process = mock.Mock(side_effect=StopIteration)
    repl._parse_args = mock.Mock(return_value=False)

    repl.run()

    mocked_print.assert_called_once_with(repl.banner)