Hi Kanika,
Thanks. The whole error message for ‘pytest -m connection’ is as below:
(mflix) linxz-MAC:tests linxz$ pytest -m connection
====================================== test session starts ======================================
platform darwin – Python 3.7.3, pytest-3.3.0, py-1.8.0, pluggy-0.6.0
rootdir: /Users/linxz/university/m220py/tests, inifile:
plugins: flask-0.10.0
collected 43 items
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 0x10ee87ac8>
@pytest.fixture(autouse=True)
def _configure_application(request, monkeypatch):
"""Use `pytest.mark.options` decorator to pass options to your application
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')
/anaconda3/envs/mflix/lib/python3.7/site-packages/pytest_flask/plugin.py:109:
conftest.py:14: in app
app.config[‘SECRET_KEY’] = config[‘TEST’][‘SECRET_KEY’]
self = <configparser.ConfigParser object at 0x10e91b278>, key = ‘TEST’
def __getitem__(self, key):
if key != self.default_section and not self.has_section(key):
raise KeyError(key)
E KeyError: ‘TEST’
/anaconda3/envs/mflix/lib/python3.7/configparser.py:958: KeyError
______________________________ ERROR at setup of test_basic_movies ______________________________
request = <SubRequest ‘_configure_application’ for <Function ‘test_basic_movies’>>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x10f0c5470>
@pytest.fixture(autouse=True)
def _configure_application(request, monkeypatch):
"""Use `pytest.mark.options` decorator to pass options to your application
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')
/anaconda3/envs/mflix/lib/python3.7/site-packages/pytest_flask/plugin.py:109:
conftest.py:14: in app
app.config[‘SECRET_KEY’] = config[‘TEST’][‘SECRET_KEY’]
self = <configparser.ConfigParser object at 0x10e91b278>, key = ‘TEST’
def __getitem__(self, key):
if key != self.default_section and not self.has_section(key):
raise KeyError(key)
E KeyError: ‘TEST’
/anaconda3/envs/mflix/lib/python3.7/configparser.py:958: KeyError
___________________________ ERROR at setup of test_search_by_movie_id ___________________________
request = <SubRequest ‘_configure_application’ for <Function ‘test_search_by_movie_id’>>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x10ef7bd30>
@pytest.fixture(autouse=True)
def _configure_application(request, monkeypatch):
"""Use `pytest.mark.options` decorator to pass options to your application
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')
/anaconda3/envs/mflix/lib/python3.7/site-packages/pytest_flask/plugin.py:109:
conftest.py:14: in app
app.config[‘SECRET_KEY’] = config[‘TEST’][‘SECRET_KEY’]
self = <configparser.ConfigParser object at 0x10e91b278>, key = ‘TEST’
def __getitem__(self, key):
if key != self.default_section and not self.has_section(key):
raise KeyError(key)
E KeyError: ‘TEST’
/anaconda3/envs/mflix/lib/python3.7/configparser.py:958: KeyError
___________________________ ERROR at setup of test_simple_text_search ___________________________
request = <SubRequest ‘_configure_application’ for <Function ‘test_simple_text_search’>>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x10f0633c8>
@pytest.fixture(autouse=True)
def _configure_application(request, monkeypatch):
"""Use `pytest.mark.options` decorator to pass options to your application
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')
/anaconda3/envs/mflix/lib/python3.7/site-packages/pytest_flask/plugin.py:109:
conftest.py:14: in app
app.config[‘SECRET_KEY’] = config[‘TEST’][‘SECRET_KEY’]
self = <configparser.ConfigParser object at 0x10e91b278>, key = ‘TEST’
def __getitem__(self, key):
if key != self.default_section and not self.has_section(key):
raise KeyError(key)
E KeyError: ‘TEST’
/anaconda3/envs/mflix/lib/python3.7/configparser.py:958: KeyError
====================================== 39 tests deselected ======================================
============================ 39 deselected, 4 error in 0.23 seconds =============================