Add comprehensive tests for all geo GraphQL endpoints
All checks were successful
Build Docker Image / build (push) Successful in 1m22s

Created test suite covering all 8 main geo service endpoints:
- Basic: products, nodes (with filters/bounds), clusteredNodes
- Nearest: nearestHubs, nearestOffers, nearestSuppliers (with product filters)
- Routing: routeToCoordinate, autoRoute, railRoute
- Edge cases: invalid coordinates, zero radius, nonexistent UUIDs

Test suite uses real API calls to production GraphQL endpoint.
16 tests total across 4 test classes.

Files:
- tests/test_graphql_endpoints.py: Main test suite (600+ lines)
- tests/README.md: Documentation and usage guide
- pytest.ini: Pytest configuration
- run_tests.sh: Convenience script to run tests
- pyproject.toml: Added pytest and requests as dev dependencies
This commit is contained in:
Ruslan Bakiev
2026-01-25 21:12:59 +07:00
parent 56df2ab37b
commit 40f7f66f83
6 changed files with 855 additions and 0 deletions

View File

@@ -22,6 +22,10 @@ dependencies = [
[tool.poetry]
package-mode = false
[tool.poetry.group.dev.dependencies]
pytest = "^8.0.0"
requests = "^2.32.0"
[build-system]
requires = ["poetry-core>=2.0.0,<3.0.0"]
build-backend = "poetry.core.masonry.api"