This paste expires on 2023-07-26 20:24:10.109391. Repaste, or download this paste. . Pasted through web.

>>> from datetime import datetime
>>> from unittest.mock import Mock
>>> dt = Mock(now=lambda: datetime.now(), spec=datetime)
>>> today = dt.now()
>>> isinstance(today, dt)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: isinstance() arg 2 must be a type, a tuple of types, or a union
Filename: None. Size: 327b. View raw, , hex, or download this file.