'Testing whether trackers are added to the libtorrent handler in LibtorrentDownloadImpl'

def test_add_trackers(self):

    def mocked_add_trackers(tracker_info):
        self.assertIsInstance(tracker_info, dict)
        self.assertEqual(tracker_info['url'], 'http://google.com')
        mocked_add_trackers.called = True
    mocked_add_trackers.called = False
    self.libtorrent_download_impl.handle.add_tracker = mocked_add_trackers
    self.libtorrent_download_impl.add_trackers(['http://google.com'])
    self.assertTrue(mocked_add_trackers.called)
