3 ms·
In Python's standard library there is the unittest.mock module [1] which allows you to patch functions and methods. For example: with patch('requests.get',
by ceronman 7y ago
In Python's standard library there is the unittest.mock module [1] which allows you to patch functions and methods. For example:
with patch('requests.get', fake.get):
definition = find_definition('testword')
[1] https://docs.python.org/3/library/unittest.mock.html https://docs.python.org/3/library/unittest.mock.html