# connector-development

Ivica Taseski

03/24/2022, 11:33 PM
Hello everyone, I am having some trouble running the unit tests in some of the source connectors. When I run _*python3 -m pytest -s unit_tests*_ what I am getting is E fixture 'requests_mock' not found
available fixtures: api, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, common_params, config, creds_with_wrong_permissions, doctest_namespace, fake_properties_list, monkeypatch, oauth_config, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, some_credentials, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
use 'pytest --fixtures [testpath]' for help on them.
Some initial investigation implies that the requests mock decorator is not recognized in python 3 which seem pretty weird since according to the docs the supported Python version for Airbyte is > 3.7 On my local machine python3 --version resolves to Python 3.7.5

Marcos Marx (Airbyte)

03/24/2022, 11:53 PM
@Ivica Taseski please follow instructions in the readme and install pyenv and install all libraries the connector needs

Ivica Taseski

03/24/2022, 11:55 PM
if you are referring to the following instructions then I have already done that
cd airbyte-integrations/connectors/source-<name> python -m venv .venv # Create a virtual environment in the .venv directory source .venv/bin/activate # enable the venv pip install -r requirements.txt
any idea on what else might be causing this?

Noah Kawasaki

03/25/2022, 12:00 AM
Maybe those commands with python3 and pip3?

Ivica Taseski

03/25/2022, 12:01 AM
the commands were copied from the docs. locally I was using python3 :)
I have tried force reinstalling the packages with pip3 install -r requirements.txt --force-reinstall but that doesn't solve the issue as well.

Sherif Nada

03/25/2022, 12:42 AM
@Ivica Taseski from the virtual env, can you run
pip install ".[tests]"
test dependencies are defined as extras in
and should be installed as described under the Unit Tests section of the README e.g:

Ivica Taseski

03/25/2022, 8:14 AM
Thanks a lot @Sherif Nada running pip install ".[tests]" solves the issue 🙂