Made it work with python3

While working on campadrenalin/EJTP-lib-python#42 I had to rewrite it to run the unittest in python3 so here is the code.