def create_user( screen_name='Faith', *, user_id=None, created_at=None, email_address=None, email_address_verified=False, initialized=True, ): if not user_id: user_id = generate_uuid() if not created_at: created_at = datetime.utcnow() if not email_address: email_address = f'user{user_id}@example.com' user = user_creation_service.build_user(created_at, screen_name, email_address) user.id = user_id user.email_address_verified = email_address_verified user.initialized = initialized return user
def create_user(number, *, screen_name=None, email_address=None, enabled=True): if not screen_name: screen_name = 'User-{:d}'.format(number) if not email_address: email_address = 'user{:03d}@example.com'.format(number) user = User.create(screen_name, email_address, 'le_password') user.id = generate_uuid() user.enabled = enabled return user
def create_user(number, *, screen_name=None, email_address=None, enabled=True): if not screen_name: screen_name = 'User-{:d}'.format(number) if not email_address: email_address = 'user{:03d}@example.com'.format(number) user = user_service.build_user(screen_name, email_address) user.id = generate_uuid() user.enabled = enabled return user
def create_user(screen_name='Faith', *, email_address=None, enabled=True): user_id = generate_uuid() if not email_address: email_address = 'user{}@example.com'.format(user_id) user = user_creation_service.build_user(screen_name, email_address) user.id = user_id user.enabled = enabled return user
def create_avatar(creator, *, id=None, created_at=None, image_type=ImageType.jpeg): if id is None: id = generate_uuid() if created_at is None: created_at = datetime.utcnow() avatar = Avatar(creator, image_type) avatar.id = id avatar.created_at = created_at return avatar
def create_avatar( creator_id, *, id=None, created_at=None, image_type=ImageType.jpeg ): if id is None: id = generate_uuid() if created_at is None: created_at = datetime.utcnow() avatar = Avatar(creator_id, image_type) avatar.id = id avatar.created_at = created_at return avatar
def create_user(screen_name='Faith', *, user_id=None, created_at=None, email_address=None, enabled=True): if not user_id: user_id = generate_uuid() if not created_at: created_at = datetime.utcnow() if not email_address: email_address = 'user{}@example.com'.format(user_id) user = user_creation_service.build_user(created_at, screen_name, email_address) user.id = user_id user.enabled = enabled return user