Error at the method test basic country search shape db

Hi,

In the test_projection.py i have an error about the argument client. Can you help me to resolve it please ?. I’d like to know if i must write a variable client =MongoClient(MFLIX_DB_URI)[MFLIX_DB_NAME] in the tes_projection.py ?

==================================================================== ERRORS ====================================================================
________________________________________________ ERROR at setup of test_basic_country_search_db ________________________________________________
file /home/user/Downloads/mflix-python/tests/test_projection.py, line 11
@pytest.mark.projection
def test_basic_country_search_db(client):
E fixture ‘client’ not found

  available fixtures: app, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
  use 'pytest --fixtures [testpath]' for help on them.

/home/user/Downloads/mflix-python/tests/test_projection.py:11
_____________________________________________ ERROR at setup of test_basic_country_search_shape_db _____________________________________________
file /home/user/Downloads/mflix-python/tests/test_projection.py, line 18
@pytest.mark.projection
def test_basic_country_search_shape_db(client):
E fixture ‘client’ not found

  available fixtures: app, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
  use 'pytest --fixtures [testpath]' for help on them.

/home/user/Downloads/mflix-python/tests/test_projection.py:18
=========================================================== short test summary info ============================================================
ERROR tests/test_projection.py::test_basic_country_search_db
ERROR tests/test_projection.py::test_basic_country_search_shape_db
======================================================= 41 deselected, 2 errors in 0.07s =======================================================

`

Search our forum threads.You will get clues
Have you run pip install -r requirements.txt
Could be dependency issues

1 Like