You can use unittest.mock.patch to "rewire" a function to an object that you control in the test This object is a unittest.mock.MagicMock For example, to set a return value, use mock.return_value = ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results