'Test whether setting the priority calls the right methods in LibtorrentDownloadImpl'

def test_set_priority(self):

    def mocked_set_priority(prio):
        self.assertEqual(prio, 1234)
        mocked_set_priority.called = True
    mocked_set_priority.called = False
    self.libtorrent_download_impl.handle.set_priority = mocked_set_priority
    self.libtorrent_download_impl.set_priority(1234)
    self.assertTrue(mocked_set_priority.called)
