Example #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'})
Example #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"}
        )
Example #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"
                                                   })
Example #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'
                                                   })