for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
import pytest
from unittest.mock import Mock
from asynctest import Mock as AsyncMock # flake8: NOQA
asynctest
This can be caused by one of the following:
This error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands.
# .scrutinizer.yml before_commands: - sudo pip install abc # Python2 - sudo pip3 install abc # Python3
This error could also result from missing __init__.py files in your module folders. Make sure that you place one file in each sub-folder.
__init__.py
from asynctest import CoroutineMock
from loafer.route import Route
route
loafer
@pytest.fixture
def route():
message_translator = Mock(translate=Mock(return_value={'content': 'message'}))
route = AsyncMock(source='queue', message_handler='handler',
message_translator=message_translator, spec=Route)
return route
def consumer():
return CoroutineMock(consume=CoroutineMock(return_value=['message']),
confirm_message=CoroutineMock())
This can be caused by one of the following:
1. Missing Dependencies
This error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands.
2. Missing __init__.py files
This error could also result from missing
__init__.py
files in your module folders. Make sure that you place one file in each sub-folder.