'Test whether the correct tracker is returned when fetching the next eligable tracker for the auto check'

@blocking_call_on_reactor_thread
def test_get_tracker_for_check(self):

    self.assertFalse(self.tracker_manager.get_next_tracker_for_auto_check())
    self.tracker_manager.initialize()
    self.assertEqual('DHT', self.tracker_manager.get_next_tracker_for_auto_check()[0])
    self.tracker_manager.add_tracker('http://test1.com:80/announce')
    self.tracker_manager._tracker_dict['http://test1.com/announce']['last_check'] = 0
    self.tracker_manager._tracker_dict['DHT']['last_check'] = 1000
    self.assertEqual('http://test1.com/announce', self.tracker_manager.get_next_tracker_for_auto_check()[0])
