Closed rleonhardt closed 9 years ago
Agreed! get_path()
should be called only once.
I haven't figured out yet why the tests fail. The fails seem unrelated to your changes...
Planned this fix for next release :)
I assume my small change has nothing to do with this, maybe a hidden test problem is showing up? Those are the only 2 cases where assertCalledOnceWith() is being called, otherwise I can only find usages of assert_called_once_with() from mock.py::228
funcopy.assert_called_once_with = assert_called_once_with
Great, thanks, I'm looking forward to it! :)
I changed the tests according to the failure messages, and travis succeeded, please review.
Merged and released! Thank you @rleonhardt :)
Overridden PathDownloadView.get_path() may contain database lookups and logging which should not be called twice if not necessary, as it was in my case. Because the acquired filename does not change inside get_file(), I replaced the duplicate call.