mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 20:42:26 +00:00
* small changes - moving provider inside the core * uptade readme * lint * remove old provider readme * leftovers * refactor website examples * ruff * fix nox * relock * fix fails_to_deliver headers * fix for tests that have renamed endpoints * fix discovery * removed test for renamed endpoint * fix broken syntax - test_search_financial_attributes * fix cash/income/balance * fix derivatives tests * fix etf tests * fix news tests * fix regulators * black * wrong test param * sort equity gainers/losers by percent * platform markdown generation import * Hotfix/fix int tests core merge (#5779) * removing tests on old endpoint * removing visualization on old endpoint * fixing equity tests * fixing examples * fix news tests * fix index test * example * add comments * example --------- Co-authored-by: Diogo Sousa <montezdesousa@gmail.com> --------- Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com> Co-authored-by: Diogo Sousa <montezdesousa@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>
Providers unit tests
In order to automatically generate unit tests for the providers you can run the following command:
python openbb_platform/providers/tests/utils/unit_test_generator.py
Note that you should be running this file from the root of the repository.
The automatic unit test generation will add unit tests for all the fetchers available in a given provider. Each provider will have one auto generated unit test file, and inside that file there will be one unit test for each fetcher. If the fetcher was added at a later stage compared with the generation of the test file, one can run the script again and new fetchers only will be added.
Note that sometimes manual intervention can be needed, for example, adjusting out-of-top level imports or adding specific arguments for a given fetcher.