I have been using patch.object(obj, attribute)
to patch an attribute of obj
:
with patch.object(StorageSaver, 'save_listing'):
ImportJob.objects.import_feed(feed.id)
but is there a way to patch the whole obj
? Eg.
with patch.object(StorageSaver):
...