fixes #288
data test updated -> handleData($stream)
unit tests for py socket
[stream] Don't emit data if empty. Replaced py test with php