TIL: time travel with Python’s standard library
There are a few different approaches for writing tests for date and/or time-sensitive functionality.
One could choose to add a sleep()
in the test, which would guarantee that the time passed, but that also has the downside of increasing the run time of the test.