Skip to content

Instantly share code, notes, and snippets.

@hpk42
Created January 4, 2018 08:15
Show Gist options
  • Save hpk42/3280fcdd13064f70606d9356a545fef7 to your computer and use it in GitHub Desktop.
Save hpk42/3280fcdd13064f70606d9356a545fef7 to your computer and use it in GitHub Desktop.
pyac test failures
============================= test session starts ==============================
platform linux -- Python 3.5.2, pytest-3.3.1, py-1.5.2, pluggy-0.6.0
rootdir: /home/hpk/p/pyac, inifile: tox.ini
collected 27 items
tests/test_crypto.py EEEEEEEE [ 29%]
tests/test_message.py ..F..F..F.F...F.... [100%]
==================================== ERRORS ====================================
__________ ERROR at setup of TestCrypto.test_gen_key_and_get_keydata ___________
crypto_maker = <function crypto_maker.<locals>.maker at 0x7f398bc1d620>
@pytest.fixture
def pgpycrypto(crypto_maker):
"""Return an initialized pgpycrypto instance."""
> return crypto_maker()
tests/conftest.py:58:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:50: in maker
pgpycrypto = PGPyCrypto(p)
autocrypt/crypto.py:103: in __init__
self._ensure_init()
autocrypt/crypto.py:112: in _ensure_init
if not os.path.exists(self.pgpydir):
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
path = local('/tmp/pytest-of-hpk/pytest-11/8220/pgpycrypto0')
def exists(path):
"""Test whether a path exists. Returns False for broken symbolic links"""
try:
> os.stat(path)
E TypeError: argument should be string, bytes or integer, not LocalPath
../../venv/pyac/lib/python3.5/genericpath.py:19: TypeError
---------------------------- Captured stdout setup -----------------------------
2018-01-04 09:15:08 DEBUG crypto.py:101 - __init__ - PGPyCrypto pgpydir /tmp/pytest-of-hpk/pytest-11/8220/pgpycrypto0
___________ ERROR at setup of TestCrypto.test_list_secret_keyhandles ___________
crypto_maker = <function crypto_maker.<locals>.maker at 0x7f398bbcbd08>
@pytest.fixture
def pgpycrypto(crypto_maker):
"""Return an initialized pgpycrypto instance."""
> return crypto_maker()
tests/conftest.py:58:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:50: in maker
pgpycrypto = PGPyCrypto(p)
autocrypt/crypto.py:103: in __init__
self._ensure_init()
autocrypt/crypto.py:112: in _ensure_init
if not os.path.exists(self.pgpydir):
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
path = local('/tmp/pytest-of-hpk/pytest-11/7320/pgpycrypto0')
def exists(path):
"""Test whether a path exists. Returns False for broken symbolic links"""
try:
> os.stat(path)
E TypeError: argument should be string, bytes or integer, not LocalPath
../../venv/pyac/lib/python3.5/genericpath.py:19: TypeError
---------------------------- Captured stdout setup -----------------------------
2018-01-04 09:15:08 DEBUG crypto.py:101 - __init__ - PGPyCrypto pgpydir /tmp/pytest-of-hpk/pytest-11/7320/pgpycrypto0
___________ ERROR at setup of TestCrypto.test_list_public_keyhandles ___________
crypto_maker = <function crypto_maker.<locals>.maker at 0x7f398bb7a268>
@pytest.fixture
def pgpycrypto(crypto_maker):
"""Return an initialized pgpycrypto instance."""
> return crypto_maker()
tests/conftest.py:58:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:50: in maker
pgpycrypto = PGPyCrypto(p)
autocrypt/crypto.py:103: in __init__
self._ensure_init()
autocrypt/crypto.py:112: in _ensure_init
if not os.path.exists(self.pgpydir):
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
path = local('/tmp/pytest-of-hpk/pytest-11/-660/pgpycrypto0')
def exists(path):
"""Test whether a path exists. Returns False for broken symbolic links"""
try:
> os.stat(path)
E TypeError: argument should be string, bytes or integer, not LocalPath
../../venv/pyac/lib/python3.5/genericpath.py:19: TypeError
---------------------------- Captured stdout setup -----------------------------
2018-01-04 09:15:08 DEBUG crypto.py:101 - __init__ - PGPyCrypto pgpydir /tmp/pytest-of-hpk/pytest-11/-660/pgpycrypto0
ERROR at setup of TestCrypto.test_transfer_key_and_encrypt_decrypt_roundtrip[True]
crypto_maker = <function crypto_maker.<locals>.maker at 0x7f398bb7a7b8>
@pytest.fixture
def pgpycrypto(crypto_maker):
"""Return an initialized pgpycrypto instance."""
> return crypto_maker()
tests/conftest.py:58:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:50: in maker
pgpycrypto = PGPyCrypto(p)
autocrypt/crypto.py:103: in __init__
self._ensure_init()
autocrypt/crypto.py:112: in _ensure_init
if not os.path.exists(self.pgpydir):
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
path = local('/tmp/pytest-of-hpk/pytest-11/-510/pgpycrypto0')
def exists(path):
"""Test whether a path exists. Returns False for broken symbolic links"""
try:
> os.stat(path)
E TypeError: argument should be string, bytes or integer, not LocalPath
../../venv/pyac/lib/python3.5/genericpath.py:19: TypeError
---------------------------- Captured stdout setup -----------------------------
2018-01-04 09:15:08 DEBUG crypto.py:101 - __init__ - PGPyCrypto pgpydir /tmp/pytest-of-hpk/pytest-11/-510/pgpycrypto0
ERROR at setup of TestCrypto.test_transfer_key_and_encrypt_decrypt_roundtrip[False]
crypto_maker = <function crypto_maker.<locals>.maker at 0x7f398bb7ac80>
@pytest.fixture
def pgpycrypto(crypto_maker):
"""Return an initialized pgpycrypto instance."""
> return crypto_maker()
tests/conftest.py:58:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:50: in maker
pgpycrypto = PGPyCrypto(p)
autocrypt/crypto.py:103: in __init__
self._ensure_init()
autocrypt/crypto.py:112: in _ensure_init
if not os.path.exists(self.pgpydir):
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
path = local('/tmp/pytest-of-hpk/pytest-11/1280/pgpycrypto0')
def exists(path):
"""Test whether a path exists. Returns False for broken symbolic links"""
try:
> os.stat(path)
E TypeError: argument should be string, bytes or integer, not LocalPath
../../venv/pyac/lib/python3.5/genericpath.py:19: TypeError
---------------------------- Captured stdout setup -----------------------------
2018-01-04 09:15:08 DEBUG crypto.py:101 - __init__ - PGPyCrypto pgpydir /tmp/pytest-of-hpk/pytest-11/1280/pgpycrypto0
__________ ERROR at setup of TestCrypto.test_gen_key_and_sign_verify ___________
crypto_maker = <function crypto_maker.<locals>.maker at 0x7f398bb7af28>
@pytest.fixture
def pgpycrypto(crypto_maker):
"""Return an initialized pgpycrypto instance."""
> return crypto_maker()
tests/conftest.py:58:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:50: in maker
pgpycrypto = PGPyCrypto(p)
autocrypt/crypto.py:103: in __init__
self._ensure_init()
autocrypt/crypto.py:112: in _ensure_init
if not os.path.exists(self.pgpydir):
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
path = local('/tmp/pytest-of-hpk/pytest-11/-900/pgpycrypto0')
def exists(path):
"""Test whether a path exists. Returns False for broken symbolic links"""
try:
> os.stat(path)
E TypeError: argument should be string, bytes or integer, not LocalPath
../../venv/pyac/lib/python3.5/genericpath.py:19: TypeError
---------------------------- Captured stdout setup -----------------------------
2018-01-04 09:15:08 DEBUG crypto.py:101 - __init__ - PGPyCrypto pgpydir /tmp/pytest-of-hpk/pytest-11/-900/pgpycrypto0
________________ ERROR at setup of TestCrypto.test_sym_decrypt _________________
crypto_maker = <function crypto_maker.<locals>.maker at 0x7f398bb83620>
@pytest.fixture
def pgpycrypto(crypto_maker):
"""Return an initialized pgpycrypto instance."""
> return crypto_maker()
tests/conftest.py:58:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:50: in maker
pgpycrypto = PGPyCrypto(p)
autocrypt/crypto.py:103: in __init__
self._ensure_init()
autocrypt/crypto.py:112: in _ensure_init
if not os.path.exists(self.pgpydir):
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
path = local('/tmp/pytest-of-hpk/pytest-11/5710/pgpycrypto0')
def exists(path):
"""Test whether a path exists. Returns False for broken symbolic links"""
try:
> os.stat(path)
E TypeError: argument should be string, bytes or integer, not LocalPath
../../venv/pyac/lib/python3.5/genericpath.py:19: TypeError
---------------------------- Captured stdout setup -----------------------------
2018-01-04 09:15:08 DEBUG crypto.py:101 - __init__ - PGPyCrypto pgpydir /tmp/pytest-of-hpk/pytest-11/5710/pgpycrypto0
____________ ERROR at setup of TestCrypto.test_sym_encrypt_decrypt _____________
crypto_maker = <function crypto_maker.<locals>.maker at 0x7f398bb83ae8>
@pytest.fixture
def pgpycrypto(crypto_maker):
"""Return an initialized pgpycrypto instance."""
> return crypto_maker()
tests/conftest.py:58:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:50: in maker
pgpycrypto = PGPyCrypto(p)
autocrypt/crypto.py:103: in __init__
self._ensure_init()
autocrypt/crypto.py:112: in _ensure_init
if not os.path.exists(self.pgpydir):
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
path = local('/tmp/pytest-of-hpk/pytest-11/-770/pgpycrypto0')
def exists(path):
"""Test whether a path exists. Returns False for broken symbolic links"""
try:
> os.stat(path)
E TypeError: argument should be string, bytes or integer, not LocalPath
../../venv/pyac/lib/python3.5/genericpath.py:19: TypeError
---------------------------- Captured stdout setup -----------------------------
2018-01-04 09:15:08 DEBUG crypto.py:101 - __init__ - PGPyCrypto pgpydir /tmp/pytest-of-hpk/pytest-11/-770/pgpycrypto0
=================================== FAILURES ===================================
__________________________ test_gen_ac_headervaluestr __________________________
def test_gen_ac_headervaluestr():
h = gen_ac_headervaluestr(ALICE, ALICE_KEYDATA, MUTUAL)
> assert h == header_unwrap(ALICE_AC)
E AssertionError: assert 'addr=alice@a.../CHT/peFNHNqW' == 'prefer-encryp...crypt.example'
E - [email protected]; prefer-encrypt=mutual; keydata=mQGNBFn+zzUBDADBo2D+WUbm3lN1lXtQTxLhxVADIIMLK1dFUgu5w1KAMrW0x9x27cRNxzVrTfiv2FiwThUHZmJBFai8HtsMvn/svrCPeGPvkjTDMCWZaEEc5/g51Uyszjf6fUsGXsC9tUcva6pGHaTe8Iwpz5stKjRKI3U/mPdQpXmaurwzEdvlNWNi9Ao2rwWV+BK3J/98gBRFT8W6gv+T/YGXVrqXMoMMKLTFze2uyO0ExJkhI64upJzD0HUbGjElYdeSWz7lYhQ2y5cmnWPfrnOxiOCVyKrgBulksda5SIjEqCJCVYprX/Wvh5feRXYftWVQUMeo6moNOhTM9X+zQJPWWuWivOJpamIuUCziEycX8RtRo0yAOPwc/vIppoxAMusQCVn15YwVECngzXUi3EB72wXJ4411VfzPCSlgVNZV7Yqx1lW4PMRcFB2oblO25rk3GDlmqEVcG1Hh4FtEBkmwVjiv4duN0E33r2Yf8OsFAkKnRCRllYn8409D...
E
E ...Full output truncated (2 lines hidden), use '-vv' to show
tests/test_message.py:59: AssertionError
_________________________ test_gen_gossip_headervalue __________________________
def test_gen_gossip_headervalue():
h = gen_gossip_headervalue(BOB, BOB_KEYDATA)
> assert h == header_unwrap(BOB_GOSSIP)
E AssertionError: assert '[email protected]/vQk6rGs' == 'keydata=mQGNB...crypt.example'
E - [email protected]; keydata=mQGNBFoBt74BDAC8AMsjPY17kxodbfmHah38ZQipY0yfuo97WUBs2jeiFYlQdunPANi5VMgbAX+HQb8LBKKoUOmJQrONj1EXz5ILEHc/rSlbJjdmCE8cw9X+EN6PW1y9XNx1ohR1OGKjs9cVW87uPmz/TkIslmfzVB6wjMIll8ax/Kb3IKr6wQXUT+JvJajWoVDOOD+7FPondqOxITXMEzinJtzqfEY6SB8q+bwRP9bMSyGaJl0fxbqdUxU4iVj8b1JpxuhFtvZik8i06avrOPfYmSnqANBOECSmuC3Uf2plIHJRFd8o12j0lzdQQH3EAcG4dAdIuGHzxdLBQSQ8o8HvBDno9epaui42HDHKUji42mf9Bc9DK4wW6SzbBGdefacEmowrwn1Ruc3TyFwfNLuM6AB3k0HhOftUz/4tFKWNlDxN/w6xT30GSE2pp21lu9xN1S6XGXOstmDX40tgdMIfZVZqzDWfkZLVeKsE7Z/SNcKouS49FdipChdy0FuEi4ua3NBFb8ImK60AEQEAAbQyZ...
E
E ...Full output truncated (2 lines hidden), use '-vv' to show
tests/test_message.py:84: AssertionError
____________________________ test_gen_gossip_email _____________________________
pcrypto = <autocrypt.crypto.PGPyCrypto object at 0x7f398baff208>
datadir = <conftest.datadir.<locals>.D object at 0x7f398bb0b6a0>
def test_gen_gossip_email(pcrypto, datadir):
msg = gen_gossip_email(ALICE, RECIPIENTS, pcrypto,
SUBJECT_GOSSIP, BODY_GOSSIP, MUTUAL,
'71DBC5657FDE65A7',
'Tue, 07 Nov 2017 14:56:25 +0100',
True,
'<[email protected]>',
> 'PLdq3hBodDceBdiavo4rbQeh0u8JfdUHL')
tests/test_message.py:107:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
autocrypt/message.py:417: in gen_gossip_email
cmsg = gen_encrypted_email(str(pgpymsg), boundary=boundary)
autocrypt/message.py:231: in gen_encrypted_email
msg = MIMEMultipartPGP(encryptedstr, boundary=boundary)
../../venv/pyac/local/lib/python3.5/site-packages/emailpgp/mime/multipartpgp.py:48: in __init__
description = MIMEApplicationPGPDescription()
../../venv/pyac/local/lib/python3.5/site-packages/emailpgp/mime/multipartpgp.py:104: in __init__
_encoder=_encoder, policy=policy, **_params)
/usr/lib/python3.5/email/mime/application.py:34: in __init__
MIMENonMultipart.__init__(self, 'application', _subtype, **_params)
/usr/lib/python3.5/email/mime/base.py:25: in __init__
self.add_header('Content-Type', ctype, **_params)
/usr/lib/python3.5/email/message.py:541: in add_header
parts.append(_formatparam(k.replace('_', '-'), v))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
param = 'policy', value = EmailPolicy(), quote = True
def _formatparam(param, value=None, quote=True):
"""Convenience function to format and return a key=value pair.
This will quote the value if needed or if quote is true. If value is a
three tuple (charset, language, value), it will be encoded according
to RFC2231 rules. If it contains non-ascii characters it will likewise
be encoded according to RFC2231 rules, using the utf-8 charset and
a null language.
"""
> if value is not None and len(value) > 0:
E TypeError: object of type 'EmailPolicy' has no len()
/usr/lib/python3.5/email/message.py:49: TypeError
---------------------------- Captured stdout setup -----------------------------
2018-01-04 09:15:08 DEBUG crypto.py:101 - __init__ - PGPyCrypto pgpydir /home/hpk/p/pyac/tests/data/pgphome
----------------------------- Captured stdout call -----------------------------
2018-01-04 09:15:08 DEBUG message.py:324 - gen_gossip_headervalues - Generating Gossip header for recipient:
[email protected]
2018-01-04 09:15:08 DEBUG message.py:324 - gen_gossip_headervalues - Generating Gossip header for recipient:
[email protected]
2018-01-04 09:15:08 DEBUG message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Omt65CupR4Tu60wS42bzw1960AjYdKZwTJjwoxdZFf15CqtoUqERf3wtjE+TNRcCnpab/3OHEbVwUqWaWxHMPV+dyEysQlv/LDC73YGnYWHXNzEfocyCX7ifIFEvzJXVxYFwpUXVZc4uVXU+gE8zZn8Alo6DEmafKygCUXXYGHFder4yl9SxQndtt/zoudjftbLhCr4Q8DCFqe8U8Hbbx0LfAJdCrOZiICvHkx9o6OIT2tbDQMc9ujWfbu9hW7Na9DuV+uTm20S0B48JirvDxUfChR3LD8Aw6HXxeVaACTzs/hTLjHfSvbPBgd9NWuqiHRn6e7H32J44kfrrbK0yZTN7pf+q70gt9VV6gC']
_________________________ test_gen_parse_gossip_email __________________________
pcrypto = <autocrypt.crypto.PGPyCrypto object at 0x7f398bb132e8>
datadir = <conftest.datadir.<locals>.D object at 0x7f398baed940>
def test_gen_parse_gossip_email(pcrypto, datadir):
msg = gen_gossip_email(ALICE, RECIPIENTS, pcrypto,
SUBJECT_GOSSIP, BODY_GOSSIP, MUTUAL,
'71DBC5657FDE65A7',
'Tue, 07 Nov 2017 14:56:25 +0100',
True,
'<[email protected]>',
> 'PLdq3hBodDceBdiavo4rbQeh0u8JfdUHL')
tests/test_message.py:128:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
autocrypt/message.py:417: in gen_gossip_email
cmsg = gen_encrypted_email(str(pgpymsg), boundary=boundary)
autocrypt/message.py:231: in gen_encrypted_email
msg = MIMEMultipartPGP(encryptedstr, boundary=boundary)
../../venv/pyac/local/lib/python3.5/site-packages/emailpgp/mime/multipartpgp.py:48: in __init__
description = MIMEApplicationPGPDescription()
../../venv/pyac/local/lib/python3.5/site-packages/emailpgp/mime/multipartpgp.py:104: in __init__
_encoder=_encoder, policy=policy, **_params)
/usr/lib/python3.5/email/mime/application.py:34: in __init__
MIMENonMultipart.__init__(self, 'application', _subtype, **_params)
/usr/lib/python3.5/email/mime/base.py:25: in __init__
self.add_header('Content-Type', ctype, **_params)
/usr/lib/python3.5/email/message.py:541: in add_header
parts.append(_formatparam(k.replace('_', '-'), v))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
param = 'policy', value = EmailPolicy(), quote = True
def _formatparam(param, value=None, quote=True):
"""Convenience function to format and return a key=value pair.
This will quote the value if needed or if quote is true. If value is a
three tuple (charset, language, value), it will be encoded according
to RFC2231 rules. If it contains non-ascii characters it will likewise
be encoded according to RFC2231 rules, using the utf-8 charset and
a null language.
"""
> if value is not None and len(value) > 0:
E TypeError: object of type 'EmailPolicy' has no len()
/usr/lib/python3.5/email/message.py:49: TypeError
---------------------------- Captured stdout setup -----------------------------
2018-01-04 09:15:09 DEBUG crypto.py:101 - __init__ - PGPyCrypto pgpydir /home/hpk/p/pyac/tests/data/pgphome
----------------------------- Captured stdout call -----------------------------
2018-01-04 09:15:09 DEBUG message.py:324 - gen_gossip_headervalues - Generating Gossip header for recipient:
[email protected]
2018-01-04 09:15:09 DEBUG message.py:324 - gen_gossip_headervalues - Generating Gossip header for recipient:
[email protected]
2018-01-04 09:15:09 DEBUG message.py:399 - gen_gossip_pt_email - gossip headers ['[email protected]; keydata=xsDNBFoBr0kBDADcL0ECNU4gPO04NrnoG9SBmlgu2eq40FRimHyM8/jvDv8lvXAifpX3fbToQhORglMMpC/Gz2hpr0ls7oFc+dATFwT6QmLVS0wUdBCq0Kr4oz7Z9EPhU6XrZAHIgjg528qTbzNA+nt6P+3md6Bc3ps04FWlVzy0BsjMt1s8kRmmyxhj73tjTWnbAm0gknT66T2pWw2nBVjvdnkduTY/ydJK590DXMxKp2Ick2xZQKBDqNfSBRCf3yGNhGKJBE1n5X+Iifgt35BoZRV1G9SLBwbM42ck+eSno7bkjYrx9wyg/kvYH34iGFLIi7xBh6qhj4/Q8CTV1E9xQ7hYSWYprBx+bMhifhQbgWoZ2Zy8i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TZDMRoPB2Rx5eSq3lMEtL6JZuQEg5DQ+TSvKlCD9SKXnchPBNJRZRT5MhH9VLx9LUPwVyEsBG/Ru69Q1DDepOxIGwVUE29ygDxKpkLa0RfxLOm2cqBdNnptRY8VvfGAUtw5QrI0EMZ52DjHH3JXreoKS/QIfUmz/s2+btgSSSBWgGgKXaE622VGyaWpOUr4b63VAU1qpTZgTl9UEeB97oienefEv3w9L604EnLJ5nOgp9/psQz++sHeWf3BHBzN3F2X//8vKHMESoEbzfbFS1mQaiS7+SpWREZfb6KCGp+w6kU6Z9GNk3vWW/WAR2wpR2LQB/K7m4crR3iFX167+ZdGxjx9vzG2WHNRe/WaG9/HjicIoTvZf1AgRkTS0CQSqJqffde4rTOtRHG2UJNe7zKrUbx/kErrWgn0M3RzJvKneedwARAQABiQG2BBgBCgAgFiEEOdcA5vJTtatSkBgpSKEd9+RtYEwFAloBoEACGwwACgkQSKEd9+RtYEzGzwwAlJgkmYzUsn3ZRFtC/qylaiC99s9gr6f8Dtw7d3c0snnEEn8OWtUneNfXRtpbxglNflDG4KCqVuGj6VzjMR1Wk4CONc8qsU+0UQIoMcHX67V5RlGuD8GqhvEZR7022Fmy5QUTgq9XSJSZfyVi4+Qi6VKKHoOmt65CupR4Tu60wS42bzw1960AjYdKZwTJjwoxdZFf15CqtoUqERf3wtjE+TNRcCnpab/3OHEbVwUqWaWxHMPV+dyEysQlv/LDC73YGnYWHXNzEfocyCX7ifIFEvzJXVxYFwpUXVZc4uVXU+gE8zZn8Alo6DEmafKygCUXXYGHFder4yl9SxQndtt/zoudjftbLhCr4Q8DCFqe8U8Hbbx0LfAJdCrOZiICvHkx9o6OIT2tbDQMc9ujWfbu9hW7Na9DuV+uTm20S0B48JirvDxUfChR3LD8Aw6HXxeVaACTzs/hTLjHfSvbPBgd9NWuqiHRn6e7H32J44kfrrbK0yZTN7pf+q70gt9VV6gC']
___________________________ test_gen_ac_setup_email ____________________________
pcrypto = <autocrypt.crypto.PGPyCrypto object at 0x7f398b923358>
datadir = <conftest.datadir.<locals>.D object at 0x7f398b923b38>
def test_gen_ac_setup_email(pcrypto, datadir):
ac_setup_email = gen_ac_setup_email(
ALICE, MUTUAL, pcrypto,
date="Sun, 05 Nov 2017 08:44:38 GMT",
keyhandle='71DBC5657FDE65A7',
boundary='Y6fyGi9SoGeH8WwRaEdC6bbBcYOedDzrQ',
> passphrase=PASSPHRASE)
tests/test_message.py:165:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
autocrypt/message.py:467: in gen_ac_setup_email
msg = MIMEMultipartACSetup(ac_setup_payload, boundary=boundary)
autocrypt/acmime.py:47: in __init__
policy=policy, **_params)
/usr/lib/python3.5/email/mime/multipart.py:36: in __init__
MIMEBase.__init__(self, 'multipart', _subtype, **_params)
/usr/lib/python3.5/email/mime/base.py:25: in __init__
self.add_header('Content-Type', ctype, **_params)
/usr/lib/python3.5/email/message.py:541: in add_header
parts.append(_formatparam(k.replace('_', '-'), v))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
param = 'policy', value = EmailPolicy(), quote = True
def _formatparam(param, value=None, quote=True):
"""Convenience function to format and return a key=value pair.
This will quote the value if needed or if quote is true. If value is a
three tuple (charset, language, value), it will be encoded according
to RFC2231 rules. If it contains non-ascii characters it will likewise
be encoded according to RFC2231 rules, using the utf-8 charset and
a null language.
"""
> if value is not None and len(value) > 0:
E TypeError: object of type 'EmailPolicy' has no len()
/usr/lib/python3.5/email/message.py:49: TypeError
---------------------------- Captured stdout setup -----------------------------
2018-01-04 09:15:09 DEBUG crypto.py:101 - __init__ - PGPyCrypto pgpydir /home/hpk/p/pyac/tests/data/pgphome
=============================== warnings summary ===============================
tests/test_message.py::test_parse_ac_email
/home/hpk/venv/pyac/local/lib/python3.5/site-packages/pgpy/decorators.py:129: UserWarning: Message was encrypted with this key's subkey: 1890EC32DDDBAA4C. Decrypting with that...
return action(_key, *args, **kwargs)
tests/test_message.py::test_gen_gossip_email
/home/hpk/p/pyac/autocrypt/crypto.py:380: UserWarning: Key B92709FC01C7C60C does not have the required usage flag EncryptStorage, EncryptCommunications; using subkey 1890EC32DDDBAA4C
sessionkey=sessionkey)
/home/hpk/p/pyac/autocrypt/crypto.py:380: UserWarning: Key 48A11DF7E46D604C does not have the required usage flag EncryptStorage, EncryptCommunications; using subkey 59C9252B6084236C
sessionkey=sessionkey)
tests/test_message.py::test_parse_gossip_email
/home/hpk/venv/pyac/local/lib/python3.5/site-packages/pgpy/decorators.py:129: UserWarning: Message was encrypted with this key's subkey: 1890EC32DDDBAA4C. Decrypting with that...
return action(_key, *args, **kwargs)
tests/test_message.py::test_gen_parse_gossip_email
/home/hpk/p/pyac/autocrypt/crypto.py:380: UserWarning: Key B92709FC01C7C60C does not have the required usage flag EncryptStorage, EncryptCommunications; using subkey 1890EC32DDDBAA4C
sessionkey=sessionkey)
/home/hpk/p/pyac/autocrypt/crypto.py:380: UserWarning: Key 48A11DF7E46D604C does not have the required usage flag EncryptStorage, EncryptCommunications; using subkey 59C9252B6084236C
sessionkey=sessionkey)
tests/test_message.py::test_parse_email
/home/hpk/venv/pyac/local/lib/python3.5/site-packages/pgpy/decorators.py:129: UserWarning: Message was encrypted with this key's subkey: 1890EC32DDDBAA4C. Decrypting with that...
return action(_key, *args, **kwargs)
-- Docs: http://doc.pytest.org/en/latest/warnings.html
=========== 5 failed, 14 passed, 7 warnings, 8 error in 1.64 seconds ===========
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment