'Test whether we set the right share mode in LibtorrentDownloadImpl'

def test_set_share_mode(self):

    def mocked_set_share_mode(val):
        self.assertTrue(val)
        mocked_set_share_mode.called = True
    mocked_set_share_mode.called = False
    self.libtorrent_download_impl.handle.set_share_mode = mocked_set_share_mode
    self.libtorrent_download_impl.set_share_mode(True)
    self.assertTrue(mocked_set_share_mode.called)
