def test_identify_payload_with_other_payload(self): assert identify_payload("foobar not a diaspora protocol") == False
def test_identify_payload_with_diaspora_payload(self): assert identify_payload(UNENCRYPTED_DIASPORA_PAYLOAD) == True
def test_identify_payload_with_diaspora_encrypted_payload(self): assert identify_payload(DIASPORA_ENCRYPTED_PAYLOAD) == True
def test_identify_payload_with_diaspora_public_payload(self): assert identify_payload(DIASPORA_PUBLIC_PAYLOAD) == True assert identify_payload(bytes(DIASPORA_PUBLIC_PAYLOAD, encoding="utf-8")) == True