Make xbbtools imports work on Python 2 and 3
Use unittest methods instead of assert statement