mirror of
https://github.com/latinogino/dolibarr-mcp.git
synced 2026-04-11 21:45:34 +02:00
Merge pull request #14 from latinogino/codex/fix-api-connection-error-in-dolibarr-mcp
Document integration tests and register pytest marker
This commit is contained in:
@@ -41,6 +41,18 @@ If you encounter "command not found" errors, ensure your virtual environment is
|
||||
python3 -m pytest
|
||||
```
|
||||
|
||||
### Integration tests
|
||||
|
||||
The suite includes a small number of `@pytest.mark.integration` tests that hit a
|
||||
real Dolibarr instance. They are skipped by default unless valid credentials are
|
||||
present. To run them:
|
||||
|
||||
```bash
|
||||
export DOLIBARR_URL="https://your-dolibarr.example.com/api/index.php"
|
||||
export DOLIBARR_API_KEY="your-api-key"
|
||||
pytest -m integration
|
||||
```
|
||||
|
||||
## Formatting and linting
|
||||
|
||||
The project intentionally avoids heavy linting dependencies. Follow the coding
|
||||
|
||||
@@ -70,6 +70,9 @@ python_files = ["test_*.py"]
|
||||
python_classes = ["Test*"]
|
||||
python_functions = ["test_*"]
|
||||
addopts = "-v --tb=short --cov=src/dolibarr_mcp"
|
||||
markers = [
|
||||
"integration: tests that require a real Dolibarr instance and valid credentials",
|
||||
]
|
||||
|
||||
[tool.coverage.run]
|
||||
source = ["src/dolibarr_mcp"]
|
||||
|
||||
Reference in New Issue
Block a user