test_get_all   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 15
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 2

1 Function

Rating   Name   Duplication   Size   Complexity  
A test_async_object() 0 8 2
1
from yfrake import client
2
import asyncio
3
import sys
4
5
6
if sys.platform == 'win32':
7
    asyncio.set_event_loop_policy(
8
        asyncio.WindowsSelectorEventLoopPolicy()
9
    )
10
11
12
async def test_async_object():
13
    @client.session
14
    async def inner():
15
        results = client.get_all(symbol='msft')
16
        async for resp in results.gather():
17
            assert bool(resp.error) is False
18
            assert bool(resp.data) is True
19
    await inner()
20