Ejemplo n.º 1
0
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()
Ejemplo n.º 2
0
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()
Ejemplo n.º 3
0
def test_user_get_by_id():
    user = User('foo', '*****@*****.**')
    user.save()

    retrieved = User.get_by_id(user.id)
    assert retrieved == user

    user.delete()
Ejemplo n.º 4
0
def test_user_get_by_id():
    user = User('foo', '*****@*****.**')
    user.save()

    retrieved = User.get_by_id(user.id)
    assert retrieved == user

    user.delete()
Ejemplo n.º 5
0
def test_user_password_is_nullable():
    user = User(email='*****@*****.**')
    user.save()
    assert user.password is None

    user.delete()
Ejemplo n.º 6
0
def test_user_password_is_nullable():
    user = User(email='*****@*****.**')
    user.save()
    assert user.password is None

    user.delete()