-
Copy the
test_config_template.inifile totest_config.ini:cp tests/test_config_template.ini tests/test_config.ini
-
Update the
test_config.inifile with the appropriate values for your environment. -
The
test_config.inifile is ignored by git and should not be committed to the repository.
First, ensure you have all the necessary dependencies installed. You can install the required packages using pip:
pip install -r requirements.txt
pip install -r requirements-test.txtTo run the tests, you can use the following command:
pytest --env=<environment>Replace <environment> with one of the following options: local, staging, or prod.
For example, to run the tests in the local environment:
pytest --env=localTo run a specific test file, use the following command:
pytest --env=<environment> path/to/test_file.pyFor example, to run the tests in test_publishing.py in the local environment:
pytest --env=local tests/test_publishing.pyFor more information on running tests with pytest, refer to the pytest documentation.