def test_retraction_to_xml(self): entity = DiasporaRetraction(handle="*****@*****.**", target_guid="x" * 16, entity_type="Post") result = entity.to_xml() assert result.tag == "retraction" converted = b"<retraction><author>[email protected]</author>" \ b"<target_guid>xxxxxxxxxxxxxxxx</target_guid><target_type>Post</target_type></retraction>" assert etree.tostring(result) == converted
def diasporaretraction(): return DiasporaRetraction( actor_id="*****@*****.**", handle="*****@*****.**", target_id="target_guid", target_guid="target_guid", entity_type="Post", )
def diasporaretraction(): return DiasporaRetraction(handle="*****@*****.**", target_guid="x" * 16, entity_type="Post")