blob: 0a93ec0f26018c70464a22c89db6e355b850a7f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import asyncio
import os
import pytest
import logging
from pyagl.services.base import AFBResponse, AFBT
from concurrent.futures import TimeoutError
from pyagl.services.{{cookiecutter.service_slug}} import {{cookiecutter.classname}}
pytestmark = pytest.mark.asyncio
@pytest.fixture(scope='module')
def event_loop():
loop = asyncio.get_event_loop()
yield loop
@pytest.fixture(scope='module')
async def service():
address = os.environ.get('AGL_TGT_IP', 'localhost')
port = os.environ.get('AGL_TGT_PORT', None)
svc = await {{cookiecutter.classname}}(ip=address, port=port)
yield svc
|