[cdap-524] modified to be possible to use with both python 2 and 3 versions

Created according to https://issues.cask.co/browse/CDAP-524
It's not possible to suppress specific warnings only. Tests do not produce any usefull warnings at all.