@Brian-Kruger’s answer is the best one. I’ve voted to undelete it. In the meantime…
Use freezegun (repo).
From the README:
from freezegun import freeze_time
@freeze_time("2012-01-14")
def test():
assert datetime.datetime.now() == datetime.datetime(2012, 1, 14)