Exemplo n.º 1
0
    def test_plain(self, monkeypatch):
        fake_code = mock.Mock(spec_set=['interact'])
        monkeypatch.setitem(sys.modules, 'code', fake_code)

        shell.plain(foo='bar', baz='qux')

        fake_code.interact.assert_called_once_with(banner='custom banner!',
                                                   local={'foo': 'bar',
                                                          'baz': 'qux'})
Exemplo n.º 2
0
    def test_plain(self, monkeypatch):
        fake_code = mock.Mock(spec_set=["interact"])
        monkeypatch.setitem(sys.modules, "code", fake_code)

        shell.plain(foo="bar", baz="qux")

        fake_code.interact.assert_called_once_with(
            banner="custom banner!", local={"foo": "bar", "baz": "qux"}
        )
Exemplo n.º 3
0
    def test_plain(self, monkeypatch):
        fake_code = mock.Mock(spec_set=["interact"])
        monkeypatch.setitem(sys.modules, "code", fake_code)

        shell.plain(foo="bar", baz="qux")

        fake_code.interact.assert_called_once_with(banner="custom banner!",
                                                   local={
                                                       "foo": "bar",
                                                       "baz": "qux"
                                                   })
Exemplo n.º 4
0
    def test_plain(self, monkeypatch):
        fake_code = mock.Mock(spec_set=['interact'])
        monkeypatch.setitem(sys.modules, 'code', fake_code)

        shell.plain(foo='bar', baz='qux')

        fake_code.interact.assert_called_once_with(banner='custom banner!',
                                                   local={
                                                       'foo': 'bar',
                                                       'baz': 'qux'
                                                   })