Unittests for connection.py - 100%coverage