Testing code for python observer pattern (observing incoming socket messages)