C:\MongoDB\M220\mflix-python>pytest -m connection
============================= test session starts =============================
platform win32 – Python 3.6.5, pytest-3.5.1, py-1.5.3, pluggy-0.6.0
rootdir: C:\MongoDB\M220\mflix-python, inifile:
plugins: remotedata-0.2.1, openfiles-0.3.0, flask-0.10.0, doctestplus-0.1.3, arr
aydiff-0.2
collected 39 items / 35 deselected
tests\test_db_connection.py EEEE [100%]
=================================== ERRORS ====================================
_____________________ ERROR at setup of test_atlas_setup ______________________
request = <SubRequest ‘_configure_application’ for <Function ‘test_atlas_setup’>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x00000000054220F0>
@pytest.fixture(autouse=True)
def _configure_application(request, monkeypatch):
"""Use `pytest.mark.options` decorator to pass options to your applicati
on
factory::
@pytest.mark.options(debug=False)
def test_something(app):
assert not app.debug, 'the application works not in debug mode!'
"""
if 'app' not in request.fixturenames:
return
app = request.getfuncargvalue('app')
C:\ProgramData\Anaconda3\lib\site-packages\pytest_flask\plugin.py:109:
tests\conftest.py:14: in app
app.config[‘SECRET_KEY’] = config[‘TEST’][‘SECRET_KEY’]
self = <configparser.ConfigParser object at 0x0000000004EED7F0>, key = ‘TEST’
def __getitem__(self, key):
if key != self.default_section and not self.has_section(key):
raise KeyError(key)
E KeyError: ‘TEST’
C:\ProgramData\Anaconda3\lib\configparser.py:959: KeyError
_____________________ ERROR at setup of test_basic_movies _____________________
request = <SubRequest ‘_configure_application’ for <Function ‘test_basic_movies’
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x00000000056B04E0>
@pytest.fixture(autouse=True)
def _configure_application(request, monkeypatch):
"""Use `pytest.mark.options` decorator to pass options to your applicati
on
factory::
@pytest.mark.options(debug=False)
def test_something(app):
assert not app.debug, 'the application works not in debug mode!'
"""
if 'app' not in request.fixturenames:
return
app = request.getfuncargvalue('app')
C:\ProgramData\Anaconda3\lib\site-packages\pytest_flask\plugin.py:109:
tests\conftest.py:14: in app
app.config[‘SECRET_KEY’] = config[‘TEST’][‘SECRET_KEY’]
self = <configparser.ConfigParser object at 0x0000000004EED7F0>, key = ‘TEST’
def __getitem__(self, key):
if key != self.default_section and not self.has_section(key):
raise KeyError(key)
E KeyError: ‘TEST’
C:\ProgramData\Anaconda3\lib\configparser.py:959: KeyError
__________________ ERROR at setup of test_search_by_movie_id __________________
request = <SubRequest ‘_configure_application’ for <Function ‘test_search_by_mov
ie_id’>>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x00000000054EABE0>
@pytest.fixture(autouse=True)
def _configure_application(request, monkeypatch):
"""Use `pytest.mark.options` decorator to pass options to your applicati
on
factory::
@pytest.mark.options(debug=False)
def test_something(app):
assert not app.debug, 'the application works not in debug mode!'
"""
if 'app' not in request.fixturenames:
return
app = request.getfuncargvalue('app')
C:\ProgramData\Anaconda3\lib\site-packages\pytest_flask\plugin.py:109:
tests\conftest.py:14: in app
app.config[‘SECRET_KEY’] = config[‘TEST’][‘SECRET_KEY’]
self = <configparser.ConfigParser object at 0x0000000004EED7F0>, key = ‘TEST’
def __getitem__(self, key):
if key != self.default_section and not self.has_section(key):
raise KeyError(key)
E KeyError: ‘TEST’
C:\ProgramData\Anaconda3\lib\configparser.py:959: KeyError
__________________ ERROR at setup of test_simple_text_search __________________
request = <SubRequest ‘_configure_application’ for <Function ‘test_simple_text_s
earch’>>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x00000000054FDDD8>
@pytest.fixture(autouse=True)
def _configure_application(request, monkeypatch):
"""Use `pytest.mark.options` decorator to pass options to your applicati
on
factory::
@pytest.mark.options(debug=False)
def test_something(app):
assert not app.debug, 'the application works not in debug mode!'
"""
if 'app' not in request.fixturenames:
return
app = request.getfuncargvalue('app')
C:\ProgramData\Anaconda3\lib\site-packages\pytest_flask\plugin.py:109:
tests\conftest.py:14: in app
app.config[‘SECRET_KEY’] = config[‘TEST’][‘SECRET_KEY’]
self = <configparser.ConfigParser object at 0x0000000004EED7F0>, key = ‘TEST’
def __getitem__(self, key):
if key != self.default_section and not self.has_section(key):
raise KeyError(key)
E KeyError: ‘TEST’
C:\ProgramData\Anaconda3\lib\configparser.py:959: KeyError
=================== 35 deselected, 4 error in 0.58 seconds ====================
C:\MongoDB\M220\mflix-python>
and as a result I can’t launch command “python run.py”