I want to test a method that calls the pylons.url object. However, calling this in tests results in an error:
TypeError: No object (name: url) has been registered for this thread
So, I would like to replace the pylons.url object with the layout from the mock library.
@patch('pylons.url')
def my_test(self, url_mock):
...
However, this is not like a url object.
Is there a way to mock this object?
source
share