My use case is pytest with parametrize method. In such situation, IsNow() will compare time generated when pytest will collect tests and now time when tests were run.
@pytest.mark.parametrize(
"params, expected",
[
(
{'some_key': 'some_value'},
IsNow(),
),
...,
],
)
def test_handler(
client,
params
expected,
):
response = make_request(params)
response['time'] = expected