2014-09-22 14:29:45 |
Chmouel Boudjnah |
description |
[Caveat: I am not a py34 expert so I may be just wrong here ;) ]
I am trying to use auth_token middleware for a personal project, this project is a py34 only. So far at runtime things seems to work and auth_token works under py34 byt when trying to integrate this with webtest I am getting this error ;
AssertionError: Iterator <list_iterator object at 0x7f8605664128> returned a non-<class 'bytes'> object: 'Authentication required'
this come from webtest which explictely check if the error message come as bytes :
https://github.com/Pylons/webtest/blob/master/webtest/lint.py#L298-L300
it seems that the obvious fix is something like this (which should work on py2 as well) :
http://paste.openstack.org/raw/fMNhM0Sd9hw4q3uuN5gq/
Which seems right, I think but I am not totally sure, let me know what do you think before I submit it. |
[Caveat: I am not a py34 expert so I may be just wrong here ;) ]
I am trying to use auth_token middleware for a personal project, this project is a py34 only. So far at runtime things seems to work and auth_token works under py34 byt when trying to integrate this with webtest for my unittesting I am getting this error ;
AssertionError: Iterator <list_iterator object at 0x7f8605664128> returned a non-<class 'bytes'> object: 'Authentication required'
this come from webtest which explictely check if the error message come as bytes :
https://github.com/Pylons/webtest/blob/master/webtest/lint.py#L298-L300
it seems that the obvious fix is something like this (which should work on py2 as well) :
http://paste.openstack.org/raw/fMNhM0Sd9hw4q3uuN5gq/
Which seems right, I think but I am not totally sure, let me know what do you think before I submit it. |
|