[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
I think its better just to suppress the specific ResourceWarning that you want to suppress:

For instance, if you put this in TestStreamClient.setUp, then you can simply call unittest.main(), without suppressing all other warnings (which there might be useful warnings in the future):
`warnings.simplefilter("ignore", ResourceWarning)`