def test_created_at_defaults_to_datetime(self): art = Article("On the nature of foo") art.save() assert bool(art.created_at) assert isinstance(art.created_at, dt.datetime)
def test_get_by_id(self): art = Article("On the nature of foo") art.save() retrieved = Article.get_by_id(art.id) assert retrieved == art