title: How do I fix this AttributeError: 'SubRequest' object has no attribute 'getfuncargvalue'?
body: <p>I am taking the MongoDB for Python Developers course at Mongo University but I have this problem when trying to run pytest -m connection on a computer mac:</p>
  
  <p>tests/test_db_connection.py EEEE                                                                                       [100%]</p>
  
  <p>=========================================================== ERRORS ===========================================================
  _____________________________________________ ERROR at setup of test_atlas_setup _____________________________________________</p>
  
  <p>request = >
  monkeypatch = &lt;_pytest.monkeypatch.MonkeyPatch object at 0x10c838cd0></p>
  
  <pre><code>@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
  </code></pre>
  
  <blockquote>
  <pre><code>  app = request.getfuncargvalue('app')
  </code></pre>
    
    <p>E       AttributeError: 'SubRequest' object has no attribute 'getfuncargvalue'</p>
  </blockquote>
  
  <p>/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pytest_flask/plugin.py:109: AttributeError
  ____________________________________________ ERROR at setup of test_basic_movies _____________________________________________</p>
  
  <p>request = >
  monkeypatch = &lt;_pytest.monkeypatch.MonkeyPatch object at 0x10c893610></p>
  
  <pre><code>@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
  </code></pre>
  
  <blockquote>
  <pre><code>  app = request.getfuncargvalue('app')
  </code></pre>
    
    <p>E       AttributeError: 'SubRequest' object has no attribute 'getfuncargvalue'</p>
  </blockquote>
  
  <p>/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pytest_flask/plugin.py:109: AttributeError
  _________________________________________ ERROR at setup of test_search_by_movie_id __________________________________________</p>
  
  <p>request = >
  monkeypatch = &lt;_pytest.monkeypatch.MonkeyPatch object at 0x10c87c750></p>
  
  <pre><code>@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
  </code></pre>
  
  <blockquote>
  <pre><code>  app = request.getfuncargvalue('app')
  </code></pre>
    
    <p>E       AttributeError: 'SubRequest' object has no attribute 'getfuncargvalue'</p>
  </blockquote>
  
  <p>/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pytest_flask/plugin.py:109: AttributeError
  _________________________________________ ERROR at setup of test_simple_text_search __________________________________________</p>
  
  <p>request = >
  monkeypatch = &lt;_pytest.monkeypatch.MonkeyPatch object at 0x10c838ed0></p>
  
  <pre><code>@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
  </code></pre>
  
  <blockquote>
  <pre><code>  app = request.getfuncargvalue('app')
  </code></pre>
    
    <p>E       AttributeError: 'SubRequest' object has no attribute 'getfuncargvalue'</p>
  </blockquote>
  
  <p>/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pytest_flask/plugin.py:109: AttributeError</p>