made test script python 3 compatible: 1.fixed mock import; 2.fixed string/unicode type; 3. dict syntax 4. close socket.
made test script python 3 compatible: 1.fixed mock import; 2.fixed string/unicode type; 3. dict syntax 4. close socket.

keenhenry/pda