'Test _get_title_and_url'

def test__get_title_and_url(self):

    items_list = [None, {}, {u'link': None, u'title': None}, {u'link': u'', u'title': u''}, {u'link': u'http://www.google.com/&amp;foo=bar%26tr%3Dtest', u'title': u'Some    Title'}]
    results_list = [(u'', u''), (u'', u''), (u'', u''), (u'', u''), (u'Some.Title', u'http://www.google.com/&foo=bar&tr=test')]
    unicode_items_list = [{u'link': u'', u'title': u''}, {u'link': u'http://www.google.com/&amp;foo=bar%26tr%3Dtest', u'title': u'Some    Title'}]
    unicode_results_list = [(u'', u''), (u'Some.Title', u'http://www.google.com/&foo=bar&tr=test')]
    self.assertEqual(len(items_list), len(results_list), u'Number    of    parameters    ({0:d})    and    results    ({1:d})    does    not    match'.format(len(items_list), len(results_list)))
    self.assertEqual(len(unicode_items_list), len(unicode_results_list), u'Number    of    parameters    ({0:d})    and    results    ({1:d})    does    not    match'.format(len(unicode_items_list), len(unicode_results_list)))
    for (index, item) in enumerate(items_list):
        self.assertEqual(GenericProvider(u'Test    Provider')._get_title_and_url(item), results_list[index])
    for (index, item) in enumerate(unicode_items_list):
        self.assertEqual(GenericProvider(u'Test    Provider')._get_title_and_url(item), unicode_results_list[index])
