[Answered ]-Django Mock isn't working as expected in Unit test

1👍

You can specify the return value of a mocked method like this:

DatasetViewSet._can_upload_file = MagicMock(return_value="valid")

Leave a comment