blob: 79183f4726b54283e679ee09cc42d2dd542a0554 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
"""Version endpoint test module.
"""
import asyncio
import aiohttp
async def main(url):
"""Test version endpoint"""
async with aiohttp.ClientSession() as session:
async with session.get(url) as resp:
assert resp.status == 200
resp = await resp.json()
assert 'api' in resp.keys()
print("Version test oolrait!")
if __name__ == '__main__':
LOOP = asyncio.get_event_loop()
LOOP.run_until_complete(main('http://0.0.0.0:8080/version'))
LOOP.close()
|