BLD: Updated hack in conf.py.

Removed dependency on mock.