def METHOD_NAME():
    """ Test the link attribute parsing """
    # No link should default to an empty list
    assert Links().get() == []
    # Single string (default relation)
    assert Links(data='/fmf/id').get() == [Link(relation='relates', target='/fmf/id')]
    # Multiple strings (default relation)
    assert Links(data=['one', 'two']).get() == [
        Link(relation='relates', target='one'), Link(relation='relates', target='two')]
    # Multiple string mixed relation
    assert Links(data=['implicit', {'duplicates': 'explicit'}]).get() == [
        Link(relation='relates', target='implicit'),
        Link(relation='duplicates', target='explicit')]
    # Multiple strings (explicit relation)
    assert Links(data=[{'parent': 'mom'}, {'child': 'son'}]).get() == [
        Link(relation='parent', target='mom'), Link(relation='child', target='son')]
    # Single dictionary (default relation)
    assert Links(data={'name': 'foo'}).get() == [
        Link(relation='relates', target=FmfId(name='foo'))]
    # Single dictionary (explicit relation)
    assert Links(data={'verifies': 'foo'}).get() == [Link(relation='verifies', target='foo')]
    # Multiple dictionaries
    family = [{'parent': 'mom', 'note': 'foo'}, {'child': 'son'}]
    assert Links(data=family).get() == [
        Link(relation='parent', target='mom', note='foo'), Link(relation='child', target='son')
        ]
    # Selected relations
    assert Links(data=family).get('parent') == [Link(relation='parent', target='mom', note='foo')]
    assert Links(data=family).get('child') == [Link(relation='child', target='son')]
    # Full fmf id
    fmf_id = tmt.utils.yaml_to_dict("""
        blocked-by:
            url: https://github.com/teemtee/fmf
            name: /stories/select/filter/regexp
        note: Need to get the regexp filter working first.
        """)
    link = Links(data=fmf_id)
    assert link.get() == [
        Link(
            relation='blocked-by',
            target=FmfId(
                url=fmf_id['blocked-by']['url'],
                name=fmf_id['blocked-by']['name']),
            note=fmf_id['note'])]
    # Invalid links and relations
    with pytest.raises(
            SpecificationError,
            match="Field 'link' must be a string, a fmf id or a list of their combinations,"
                  " 'int' found."):
        Links(data=123)
    with pytest.raises(SpecificationError, match='Multiple relations'):
        Links(data={'verifies': 'one', 'blocks': 'another'})
    with pytest.raises(SpecificationError, match='Invalid link relation'):
        Links(data={'depends': 'other'})
    # Searching for links
    links = Links(data=[{'parent': 'mom', 'note': 'foo'}, {'child': 'son', 'note': 'bar'}])
    assert links.has_link()
    assert links.has_link(needle=LinkNeedle())
    assert links.has_link(needle=LinkNeedle(relation=r'.*', target=r'.*'))
    assert links.has_link(needle=LinkNeedle(relation='[a-z]+'))
    assert links.has_link(needle=LinkNeedle(relation='en'))
    assert links.has_link(needle=LinkNeedle(target='^mom$'))
    assert links.has_link(needle=LinkNeedle(target='on'))
    assert not links.has_link(needle=LinkNeedle(relation='verifies', target='son'))
    assert not links.has_link(needle=LinkNeedle(relation='parent', target='son'))
    links = Links(data=[])
    assert not links.has_link()
    assert not links.has_link(needle=LinkNeedle())
    assert not links.has_link(needle=LinkNeedle(relation=r'.*', target=r'.*'))