| name | testing |
|---|---|
| description | pytest and unittest tests for contentstack-python — tests/ and config.py. |
| Goal | Command |
|---|---|
| Full test tree | pytest tests/ |
| Single file | pytest tests/test_stack.py |
- Root
config.py: HOST, APIKEY, DELIVERYTOKEN, ENVIRONMENT, optional PREVIEW_TOKEN, content UIDs for specific suites. - Use a local
config.pyor sanitized values; never commit live secrets.
- Tests subclass
unittest.TestCase;tests/pytest.iniapplies warning filters.
| Area | Example tests |
|---|---|
| Stack / region | tests/test_stack.py |
| Queries | tests/test_query.py, tests/test_basequery.py |
| Entries / assets | tests/test_entry.py, tests/test_assets.py |
| Taxonomy / global fields / live preview | tests/test_taxonomies.py, tests/test_global_fields.py, tests/test_live_preview.py |
| Early access | tests/test_early_find.py, tests/test_early_fetch.py |
- No committed
pytest.mark.skipwithout reason; avoid@unittest.skipunless environment is genuinely unavailable in CI.