'Test whether the tracker info is correctly updated'

@blocking_call_on_reactor_thread
def test_update_tracker_info(self):

    self.tracker_manager.update_tracker_info('http://nonexisting.com', True)
    self.assertEqual(len(self.tracker_manager._tracker_dict), 0)
    self.tracker_manager.add_tracker('http://test1.com:80/announce')
    self.tracker_manager.update_tracker_info('http://test1.com/announce', False)
    self.assertEqual(self.tracker_manager._tracker_dict['http://test1.com/announce']['failures'], 1)
    self.tracker_manager.update_tracker_info('http://test1.com/announce', True)
    self.assertTrue(self.tracker_manager._tracker_dict['http://test1.com/announce']['is_alive'])
