def setUpClass(self): UserTest.test_token = tokenutils.generate_auth_token( 'password', 'admin', 60) models.initialize_models({ 'database.name': ':memory:', 'database.type': 'sqlite' })
def test_initialize_models(self): models.initialize_models({ 'database.name': ':memory:', 'database.type': 'sqlite' }) self.assertTrue(models.Registration.table_exists()) self.assertTrue(models.User.table_exists())
def setUpClass(self): models.initialize_models({ 'database.name': ':memory:', 'database.type': 'sqlite' }) iam.create('user', 'some_password') EventTest.auth_header = { 'Authorization': tokenutils.generate_auth_token('password', 'user', 120) }
def setUpClass(self): models.initialize_models({'database.name': ':memory:', 'database.type': 'sqlite'}) iam.create('user', 'some_password') EventTest.auth_header = { 'Authorization': tokenutils.generate_auth_token( 'password', 'user', 120) }
def setUpClass(self): models.initialize_models({'database.name': ':memory:', 'database.type': 'sqlite'}) iam.create('user', 'some_password') RegistrationTest.test_user = models.User.get(models.User.id == 'user') RegistrationTest.auth_header = { 'Authorization': tokenutils.generate_auth_token( 'password', RegistrationTest.test_user.id, 120) }
def setUpClass(self): models.initialize_models({ 'database.name': ':memory:', 'database.type': 'sqlite' }) iam.create('user', 'some_password') RegistrationTest.test_user = models.User.get(models.User.id == 'user') RegistrationTest.auth_header = { 'Authorization': tokenutils.generate_auth_token('password', RegistrationTest.test_user.id, 120) }
def setUpClass(self): models.initialize_models({'database.name': ':memory:', 'database.type': 'sqlite'}) iam.create('user', 'some_password') MetricsTest.test_user = models.User.get(models.User.id == 'user') MetricsTest.auth_header = { 'Authorization': tokenutils.generate_auth_token( 'password', MetricsTest.test_user.id, 120) } MetricsTest.registration_id = models.Registration.create( topic=MetricsTest.topic, container=MetricsTest.container, creator=MetricsTest.test_user ).id
def setUpClass(self): models.initialize_models({'database.name': ':memory:', 'database.type': 'sqlite'})
def test_initialize_models(self): models.initialize_models({"database.name": ":memory:", "database.type": "sqlite"}) self.assertTrue(models.Registration.table_exists()) self.assertTrue(models.User.table_exists())
def setUpClass(self): UserTest.test_token = tokenutils.generate_auth_token("password", "admin", 60) models.initialize_models({"database.name": ":memory:", "database.type": "sqlite"})
def setUpClass(self): models.initialize_models({ 'database.name': ':memory:', 'database.type': 'sqlite' })
from bakula.bottle import configuration app = Bottle() # To add a subapplication simply do the necessary imports and add the # application to the list below sub_apps = [ healthcheck.app, registration.app, user.app, event.app, images.app, metrics.app ] if __name__ == '__main__': parser = argparse.ArgumentParser(description='Bakula server') parser.add_argument('-H', '--host', help='host address', default='localhost') parser.add_argument('-P', '--port', help='port of the bakula server', default='5000') args = parser.parse_args() for sub_app in sub_apps: app.merge(sub_app) configuration.bootstrap_app_config(app) initialize_models(app.config) run(app, host=args.host, port=args.port, server='cherrypy')