FreezeGun

FreezeGun is a library that allows your python tests to travel through time by mocking the datetime module.

Usage

Once the decorator or context manager have been invoked, all calls to datetime.datetime.now(), datetime.datetime.utcnow(), and datetime.date.today() will return the time that has been frozen.

Hmmm, cool for writing tests for Pydap. I will definitely use this.