def test_link3(): link = Link(rel="http://webfinger.net/rel/profile-page", href="http://www.example.com/~bob/") assert set(link.keys()) == {'rel', 'href'} assert link['rel'] == "http://webfinger.net/rel/profile-page" assert link['href'] == "http://www.example.com/~bob/"
def test_link1(): link = Link(rel="http://webfinger.net/rel/avatar", type="image/jpeg", href="http://www.example.com/~bob/bob.jpg") assert set(link.keys()) == {'rel', 'type', 'href'} assert link['rel'] == "http://webfinger.net/rel/avatar" assert link['type'] == "image/jpeg" assert link['href'] == "http://www.example.com/~bob/bob.jpg"
def test_link2(): link = Link(rel="blog", type="text/html", href="http://blogs.example.com/bob/", titles={ "en-us": "The Magical World of Bob", "fr": "Le monde magique de Bob" }) assert set(link.keys()) == {'rel', 'type', 'href', 'titles'} assert link['rel'] == "blog" assert link['type'] == "text/html" assert link['href'] == "http://blogs.example.com/bob/" assert set(link['titles'].keys()) == {'en-us', 'fr'}