-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Labels
Description
The current simulation code patches datetime.datetime here this works for any import of datetime but fails on any modules that have already imported the datetime class via from datetime import datetime
import datetime
from datetime import datetime as dt
datetime.datetime.utcnow() == config.publish_time
dt.utcnow() != config.pubish_timeIn order to do this each module needs to be cycled and patched accordingly as well as being unpatched on exit, the freezegun library does something similar with this scary code