-
- Downloads
Replace mock_package_sql by a mock_import_swhmodule fixture
in favor of using (and thus testing) the stock get_sql_for_package() function (on the mock module returned by mock_import_swhmodule). This comes with a change in expected test data structure for sql script; the `tests/data/<mod>` is now expected to store the sql script files in a dedicated `sql/` sub directory instead of having them directly in the `<mod>` directory so that the get_sql_for_package() can be used in tests unmocked.
Showing
- swh/core/db/tests/conftest.py 29 additions, 19 deletionsswh/core/db/tests/conftest.py
- swh/core/db/tests/data/cli/sql/0-superuser-init.sql 0 additions, 0 deletionsswh/core/db/tests/data/cli/sql/0-superuser-init.sql
- swh/core/db/tests/data/cli/sql/30-schema.sql 0 additions, 0 deletionsswh/core/db/tests/data/cli/sql/30-schema.sql
- swh/core/db/tests/data/cli/sql/40-funcs.sql 0 additions, 0 deletionsswh/core/db/tests/data/cli/sql/40-funcs.sql
- swh/core/db/tests/data/cli/sql/50-data.sql 0 additions, 0 deletionsswh/core/db/tests/data/cli/sql/50-data.sql
- swh/core/db/tests/data/cli_new/sql/0-superuser-init.sql 0 additions, 0 deletionsswh/core/db/tests/data/cli_new/sql/0-superuser-init.sql
- swh/core/db/tests/data/cli_new/sql/30-schema.sql 0 additions, 0 deletionsswh/core/db/tests/data/cli_new/sql/30-schema.sql
- swh/core/db/tests/data/cli_new/sql/40-funcs.sql 0 additions, 0 deletionsswh/core/db/tests/data/cli_new/sql/40-funcs.sql
- swh/core/db/tests/data/cli_new/sql/50-data.sql 0 additions, 0 deletionsswh/core/db/tests/data/cli_new/sql/50-data.sql
- swh/core/db/tests/data/cli_new/sql/upgrades/001.sql 0 additions, 0 deletionsswh/core/db/tests/data/cli_new/sql/upgrades/001.sql
- swh/core/db/tests/data/cli_new/sql/upgrades/002.sql 0 additions, 0 deletionsswh/core/db/tests/data/cli_new/sql/upgrades/002.sql
- swh/core/db/tests/data/cli_new/sql/upgrades/003.sql 0 additions, 0 deletionsswh/core/db/tests/data/cli_new/sql/upgrades/003.sql
- swh/core/db/tests/data/cli_new/sql/upgrades/004.sql 0 additions, 0 deletionsswh/core/db/tests/data/cli_new/sql/upgrades/004.sql
- swh/core/db/tests/data/cli_new/sql/upgrades/005.sql 0 additions, 0 deletionsswh/core/db/tests/data/cli_new/sql/upgrades/005.sql
- swh/core/db/tests/data/cli_new/sql/upgrades/006.sql 0 additions, 0 deletionsswh/core/db/tests/data/cli_new/sql/upgrades/006.sql
- swh/core/db/tests/test_cli.py 26 additions, 32 deletionsswh/core/db/tests/test_cli.py
- swh/core/db/tests/test_db_utils.py 19 additions, 4 deletionsswh/core/db/tests/test_db_utils.py
Loading
Please register or sign in to comment