def test_tweet_init():
    with pytest.raises(ValueError) as e:
        Tweet("")
    assert "empty text" in str(e.value)

    with pytest.raises(TypeError) as e:
        Tweet("foobar", 0)
    assert str(e.value) in "created_at is of invalid type"

    source = Source("foo", "bar")
    created_at = datetime.now(timezone.utc)
    tweet = Tweet("foobar", created_at, source)
    assert tweet.text == "foobar"
    assert tweet.created_at == created_at.replace(microsecond=0)
    assert tweet.source == source
dataset/ETHPy150Open buckket/twtxt/tests/test_models.py/test_tweet_init/swapped operands of `in`