def test_shift_time(): dt = datetime.utcnow() t = shift_time(dt, 10) delta = t - dt # exactly 10 assert delta.seconds == 10