Use mock third party library to be compatible with python2.7