def test_user_created_at_defaults_to_datetime(): user = User(email='*****@*****.**') user.save() assert bool(user.created_at) assert isinstance(user.created_at, dt.datetime) user.delete()
def test_user_get_by_id(): user = User('foo', '*****@*****.**') user.save() retrieved = User.get_by_id(user.id) assert retrieved == user user.delete()
def test_user_password_is_nullable(): user = User(email='*****@*****.**') user.save() assert user.password is None user.delete()