def user(): """Prepare user object.""" profile = fake.simple_profile() user = User(None, username=profile['username'], password=fake.password(), organization=organization(), active=True) user.save() return user
organization = Organization( id=uuid_organization, name='DemoOrg', namespace='demoorg' ) organization.save() except: raise Exception('Adding DemoOrg organization failed') try: user = User( username='******', password='******', organization=organization, ) user.save() except: raise Exception('Adding admin user failed') # AWS + Jenkins try: provisioner = Provisioner( id=uuid_provisioner_jenkins, name='Jenkins provisioner to AWS', state='OK', engine='kqueen.engines.JenkinsEngine', parameters={ 'username': '******', 'password': '******' } )