tests: mock get_entry_points and import_module
Replace mockups of (swh.core) import_swhmodule and get_swh_backend_module by mockups of lower level functions get_entry_points (actually backports.entry_points_selectable.entry_points) and importlib.import_module. This allows to actually test these (previously mocked) functions, and to clarify a bit the way this loading mechanism works in tests. Loaded "backends" are now actual python packages located in <datadir>/test/<cls>.
parent
eb386867
No related branches found
No related tags found
Showing
- swh/core/db/tests/conftest.py 45 additions, 77 deletionsswh/core/db/tests/conftest.py
- swh/core/db/tests/data/test/__init__.py 0 additions, 0 deletionsswh/core/db/tests/data/test/__init__.py
- swh/core/db/tests/data/test/cli2/__init__.py 0 additions, 0 deletionsswh/core/db/tests/data/test/cli2/__init__.py
- swh/core/db/tests/data/test/cli2/sql/0-superuser-init.sql 0 additions, 0 deletionsswh/core/db/tests/data/test/cli2/sql/0-superuser-init.sql
- swh/core/db/tests/data/test/cli2/sql/30-schema.sql 0 additions, 0 deletionsswh/core/db/tests/data/test/cli2/sql/30-schema.sql
- swh/core/db/tests/data/test/cli2/sql/40-funcs.sql 0 additions, 0 deletionsswh/core/db/tests/data/test/cli2/sql/40-funcs.sql
- swh/core/db/tests/data/test/cli2/sql/50-data.sql 0 additions, 0 deletionsswh/core/db/tests/data/test/cli2/sql/50-data.sql
- swh/core/db/tests/data/test/cli2/sql/upgrades/001.sql 0 additions, 0 deletionsswh/core/db/tests/data/test/cli2/sql/upgrades/001.sql
- swh/core/db/tests/data/test/cli2/sql/upgrades/002.sql 0 additions, 0 deletionsswh/core/db/tests/data/test/cli2/sql/upgrades/002.sql
- swh/core/db/tests/data/test/cli2/sql/upgrades/003.sql 0 additions, 0 deletionsswh/core/db/tests/data/test/cli2/sql/upgrades/003.sql
- swh/core/db/tests/data/test/cli2/sql/upgrades/004.sql 0 additions, 0 deletionsswh/core/db/tests/data/test/cli2/sql/upgrades/004.sql
- swh/core/db/tests/data/test/cli2/sql/upgrades/005-bis.sql 0 additions, 0 deletionsswh/core/db/tests/data/test/cli2/sql/upgrades/005-bis.sql
- swh/core/db/tests/data/test/cli2/sql/upgrades/005.sql 0 additions, 0 deletionsswh/core/db/tests/data/test/cli2/sql/upgrades/005.sql
- swh/core/db/tests/data/test/cli2/sql/upgrades/006.sql 0 additions, 0 deletionsswh/core/db/tests/data/test/cli2/sql/upgrades/006.sql
- swh/core/db/tests/data/test/postgresql/__init__.py 0 additions, 0 deletionsswh/core/db/tests/data/test/postgresql/__init__.py
- swh/core/db/tests/data/test/postgresql/sql/0-superuser-init.sql 0 additions, 0 deletions...re/db/tests/data/test/postgresql/sql/0-superuser-init.sql
- swh/core/db/tests/data/test/postgresql/sql/15-flavor.sql 0 additions, 0 deletionsswh/core/db/tests/data/test/postgresql/sql/15-flavor.sql
- swh/core/db/tests/data/test/postgresql/sql/30-schema.sql 0 additions, 0 deletionsswh/core/db/tests/data/test/postgresql/sql/30-schema.sql
- swh/core/db/tests/data/test/postgresql/sql/40-funcs.sql 0 additions, 0 deletionsswh/core/db/tests/data/test/postgresql/sql/40-funcs.sql
- swh/core/db/tests/data/test/postgresql/sql/50-data.sql 0 additions, 0 deletionsswh/core/db/tests/data/test/postgresql/sql/50-data.sql
Loading
Please register or sign in to comment