GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 83e594...bc5271 )
by Michael
02:06
created

tests.CoroMock()   A

Complexity

Conditions 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %
Metric Value
cc 1
dl 0
loc 5
rs 9.4285
1
from asyncio import coroutine
2
from unittest.mock import Mock
3
4
5
def CoroMock(**kwargs):
6
    coro = Mock(name="CoroutineResult", **kwargs)
7
    corofunc = Mock(name="CoroutineFunction", side_effect=coroutine(coro))
8
    corofunc.coro = coro
9
    return corofunc
10