test: add baseUrl validation tests to all service test files#488
test: add baseUrl validation tests to all service test files#488gourabsingha1 wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces unit tests across various test suites to verify API URL determination for both test and live environments, including error handling when the live endpoint prefix is missing. The feedback highlights a potential issue where tests mutate the shared live_endpoint_prefix state without proper cleanup on assertion failures. It is recommended to wrap these test blocks in try...finally structures to prevent state leakage and ensure test isolation.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|



Description
This PR addresses issue #475 by adding
baseUrlenvironment validation tests (test_base_url_test_environment,test_base_url_live_environment, andtest_base_url_live_environment_no_prefix_raiseswhere applicable) directly into each of the individual service test files.Previously,
baseUrlresolution checks were centralized inDetermineEndpointTest.pyor only tested on specific services likeRecurringTest.py. With this update, each service test class is self-contained and independently validates that its corresponding service builds/resolves base API URLs correctly for different environment configurations (Test vs. Live platforms).Approach
Added the standard set of base URL validation tests at the end of the following service test suites:
BalancePlatformTest.pyBinLookupTest.pyCapitalTest.pyCheckoutTest.pyCheckoutUtilityTest.pyDataProtectionTest.pyDisputesTest.pyLegalEntityManagementTest.pyManagementTest.pyPaymentTest.pyPosMobileTest.pySessionAuthenticationTest.pyStoredValueTest.pyTerminalTest.pyThirdPartyPayoutTest.pyTransfersTest.pyTesting
Ran the entire test suite:
Verified that all 215 tests pass successfully.