def test_profile_is_parsed(self): hcard = generate_hcard( "diaspora", hostname="https://example.com", fullname="fullname", firstname="firstname", lastname="lastname", photo300="photo300", photo100="photo100", photo50="photo50", searchable="true", guid="guidguidguidguid", public_key="public_key", username="******", ) profile = parse_profile_from_hcard(hcard, "*****@*****.**") assert profile.name == "fullname" assert profile.image_urls == { "small": "photo50", "medium": "photo100", "large": "photo300" } assert profile.public == True assert profile.handle == "*****@*****.**" assert profile.guid == "guidguidguidguid" assert profile.public_key == "public_key\n" profile.validate()