pallets-eco / flask-jwt

JWT (JSON Web Tokens) for Flask applications
MIT License
564 stars 177 forks source link

Fix with test: _default_jwt_payload_handler doesn't handle dicts as the code seems to imply it should #86

Closed oisinmulvihill closed 8 years ago

oisinmulvihill commented 8 years ago

Fixed a bug whereby a dict cause AttributeError even though the _default_jwt_payload_handler is supposed to handle objects and dicts. I've added a test and my proposed fix for this.

oisinmulvihill commented 8 years ago

all tests pass locally not sure what travis-ci is complaining about :(

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-0.6%) to 95.092% when pulling 351d94a88ac7ef6a068b173b0c1b4091944b8684 on oisinmulvihill:master into c27084114e258863b82753fc574a362cd6c62fcd on mattupstate:master.

oisinmulvihill commented 8 years ago

$ py.test ============================================================================================ test session starts ============================================================================================= platform linux2 -- Python 2.7.6, pytest-2.9.2, py-1.4.31, pluggy-0.3.1 rootdir: /home/vagrant/src/flask-jwt, inifile: setup.cfg plugins: flask-0.10.0 collected 20 items

tests/test_jwt.py ....................

========================================================================================= 20 passed in 2.27 seconds ========================================================================================== (scpenv) vagrant@devbox [flask-jwt] $

oisinmulvihill commented 8 years ago

Weird, when run elsewhere its causing a problem but not for me, makes it hard to fix this :(

stephane commented 8 years ago

Already fixed by #63 and many others.

oisinmulvihill commented 8 years ago

great, can join mainline again, thx

stephane commented 8 years ago

Excepted #63 is not merged yet... (the project seems dead https://github.com/mattupstate/flask-jwt/pull/95)

oisinmulvihill commented 8 years ago

I'll pull in your fixes from your branch https://github.com/webstack/flask-jwt/tree/fork into mine then in the meantime.