def test_identify_payload_with_diaspora_encrypted_payload(self): assert identify_request(RequestType(body=DIASPORA_ENCRYPTED_PAYLOAD)) is True
def test_identify_payload_with_reshare(self): assert identify_request(RequestType(body=DIASPORA_RESHARE_PAYLOAD)) is True
def test_identify_payload_with_diaspora_public_payload(self): assert identify_request(RequestType(body=DIASPORA_PUBLIC_PAYLOAD)) is True assert identify_request(RequestType(body=bytes(DIASPORA_PUBLIC_PAYLOAD, encoding="utf-8"))) is True
def test_identify_payload_with_other_payload(self): assert identify_request(RequestType(body="foobar not a diaspora protocol")) is False