def test_internal_fields_not_returned(user): u = User(**user) result = u.clean() assert '_id' not in result assert 'password' not in result assert 'verification_hash' not in result
def test_unverified(): u = User(**UNVERIFIED_USER) result = u.clean() assert result['verified'] is False
def test_verified(): u = User(**VERIFIED_USER) result = u.clean() assert result['verified'] is True