()
| 21 | async def aiohttp_client(aiohttp_client): |
| 22 | |
| 23 | async def initialize(): |
| 24 | with open(Path(__file__).parents[2] / 'conf' / 'default.yml', 'r') as fle: |
| 25 | BaseWorld.apply_config('main', yaml.safe_load(fle)) |
| 26 | with open(Path(__file__).parents[2] / 'conf' / 'payloads.yml', 'r') as fle: |
| 27 | BaseWorld.apply_config('payloads', yaml.safe_load(fle)) |
| 28 | |
| 29 | app_svc = AppService(web.Application()) |
| 30 | _ = DataService() |
| 31 | _ = RestService() |
| 32 | auth_svc = AuthService() |
| 33 | services = app_svc.get_services() |
| 34 | os.chdir(str(Path(__file__).parents[2])) |
| 35 | |
| 36 | await app_svc.load_plugins(['sandcat', 'ssl']) |
| 37 | _ = await RestApi(services).enable() |
| 38 | await auth_svc.apply(app_svc.application, auth_svc.get_config('users')) |
| 39 | await auth_svc.set_login_handlers(services) |
| 40 | return app_svc.application |
| 41 | |
| 42 | app = await initialize() |
| 43 | yield await aiohttp_client(app) |
no test coverage detected