freezegun
freezegun copied to clipboard
Feature request: allow it to accept no datetime and default to `utcnow`
Description
It would be good to be able to use this context manager/decorator as a way to tell the tests to just freeze time without having to specify any datetime.
Currently it accepts None
as a possible value and it defaults to .utcnow()
, so it looks like the implementation should be trivial:
https://github.com/spulec/freezegun/blob/33fdce860fc72d7cea1c61c6e806245cc0dc96dc/freezegun/api.py#L460-L465