def test_relative_datetime_now_with_tzinfo(self, monkeypatch): monkeypatch.setattr("datestuff.relative.datetime", FakeDateTime) rdt = RelativeDateTime.now(UTC) assert within_delta(rdt, FakeDateTime.now(UTC), timedelta(seconds=1))
def test_relative_datetime_now_with_tzinfo(self, monkeypatch): monkeypatch.setattr('datestuff.relative.datetime', FakeDateTime) rdt = RelativeDateTime.now(UTC) assert within_delta(rdt, FakeDateTime.now(UTC), timedelta(seconds=1))
def test_relative_datetime_now(self, monkeypatch): monkeypatch.setattr("datestuff.relative.datetime", FakeDateTime) rdt = RelativeDateTime.now() # just need to know it is close enough assert within_delta(rdt, FakeDateTime.now(), timedelta(seconds=1))
def test_relative_datetime_now(self, monkeypatch): monkeypatch.setattr('datestuff.relative.datetime', FakeDateTime) rdt = RelativeDateTime.now() # just need to know it is close enough assert within_delta(rdt, FakeDateTime.now(), timedelta(seconds=1))