Fixed assertion to be compliant with py3