Exemplo n.º 1
0
    def setUp(self):
        super().setUp()

        connect('metaddata', host='mongomock://localhost', alias='metadata')
        config = {
            "auth_key_file": "config/auth.key",
            "celery_config": "config/celery_config.json",
            "metadata_config": {},
        }
        self.SECRET_KEY = open(config["auth_key_file"]).read()
        self.app = webapi.main(config)
Exemplo n.º 2
0
    def setUp(self):
        super().setUp()

        connect('metaddata', host='mongomock://localhost', alias='metadata')

        test_dir = tempfile.mkdtemp('test_home')
        storage.from_config({'home': test_dir})

        config = {
            "auth_key_file": "config/auth.key",
            "celery_config": "config/celery_config.json",
            "metadata_config": {},
        }
        self.SECRET_KEY = open(config["auth_key_file"]).read()
        self.app = webapi.main(config)
Exemplo n.º 3
0
from gevent import monkey
monkey.patch_all()

import webapi

webapi.init_logging()
config = webapi.from_config('config/web_api_config.json')
api = webapi.main(config)

if __name__ == '__main__':
    webapi.serve_forever(api, config)