Im pretty new at mocking in Python. I searched pretty deeply for any post that answered this question, but i failed to do so. I want to mock a function that is called within a while statement. Is there anyway to do this?
def some_function(self, some_param):
some_counter = 0
while self.func_i_want_to_mock(mock_param, mock_param2) is False:
some_counter += 1
return some_counter