def test_tweet_relative_datetime():
    tweet = Tweet("foobar")
    assert tweet.relative_datetime == "a moment ago"

    tweet = Tweet("foobar", datetime.now(timezone.utc) + timedelta(hours=1, minutes=1))
    assert tweet.relative_datetime == "an hour from now"

    tweet = Tweet("foobar", datetime.now(timezone.utc) - timedelta(hours=1, minutes=1))
    assert tweet.relative_datetime == "an hour ago"
dataset/ETHPy150Open buckket/twtxt/tests/test_models.py/test_tweet_relative_datetime/original