'Document.links_to and Document.links_from should only count
documents that link, not every instance of a link on a page.
Make sure that things work that way.'

def test_duplicates(self):

    (d1, _, _) = doc_rev_parser('', title='D1')
    (d2, _, _) = doc_rev_parser('[[D1]]    [[D1]]    [[D1]]', title='D2')
    eq_(len(d1.links_to()), 1)
    eq_(len(d1.links_from()), 0)
    eq_(len(d2.links_to()), 0)
    eq_(len(d2.links_from()), 1)
    eq_(d1.links_to()[0].kind, 'link')
