def test_mock_up_thing(self): thing = Phonebook() #<MagicMock id='140115817358032'> thing.method = MagicMock(return_value=3) # It is going to return 3 thing.method(3, 4, 5, key='value') thing.method.assert_called_with(3, 4, 5, key='value')
def test_mock_up_thing(self): thing = Phonebook() #<MagicMock id='140115817358032'> thing.method = MagicMock(return_value=3) # It is going to return 3 thing.method(3, 4, 5, key='value') thing.method.assert_called_with(3, 4, 5, key='value')