(self)
| 167 | call_command("shell", interface="ipython") |
| 168 | |
| 169 | def test_bpython(self): |
| 170 | cmd = shell.Command() |
| 171 | mock_bpython = mock.Mock(embed=mock.MagicMock()) |
| 172 | options = {"verbosity": 0, "no_imports": False} |
| 173 | |
| 174 | with mock.patch.dict(sys.modules, {"bpython": mock_bpython}): |
| 175 | cmd.bpython(options) |
| 176 | |
| 177 | self.assertEqual( |
| 178 | mock_bpython.embed.mock_calls, [mock.call(cmd.get_namespace(**options))] |
| 179 | ) |
| 180 | |
| 181 | @mock.patch("django.core.management.commands.shell.select.select") # [1] |
| 182 | @mock.patch.dict("sys.modules", {"bpython": None}) |
nothing calls this directly
no test coverage detected