'Test find_identical_books'

def test_find_identical_books(self):

    from calibre.ebooks.metadata.book.base import Metadata
    from calibre.db.utils import find_identical_books
    cache = self.init_cache(self.library_path)
    data = cache.data_for_find_identical_books()
    for (mi, books) in ((Metadata(u'title    one', [u'author    one']), {2}), (Metadata(_(u'Unknown')), {3}), (Metadata(u'title    two', [u'author    one']), {1})):
        self.assertEqual(books, cache.find_identical_books(mi))
        self.assertEqual(books, find_identical_books(mi, data))
