[Test] Add baseUrl environment tests to all service test files
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- python
- Lĩnh vực
- api, testing-qa
Hướng nghiên cứu
Bắt đầu với RecurringTest.py và so sánh ba bài kiểm thử baseUrl của nó với các tệp kiểm thử dịch vụ được liệt kê. Thêm phạm vi bao phủ tương đương cho môi trường kiểm thử và môi trường live bằng cách sử dụng mẫu URL của từng dịch vụ, chỉ áp dụng trường hợp không có tiền tố cho PAL và các dịch vụ dựa trên checkout. Chạy các bài kiểm thử của những dịch vụ bị ảnh hưởng và xác nhận rằng mọi tệp được liệt kê đều có phạm vi bao phủ phù hợp.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Context
RecurringTest.py has three tests that validate the baseUrl resolves correctly for both environments:
def test_base_url_test_environment(self):
url = self.adyen.client._determine_api_url("test", self.baseUrl)
self.assertEqual(url, self.baseUrl)
self.assertTrue(url.startswith("https://pal-test.adyen.com/pal/servlet/Recurring/"))
def test_base_url_live_environment(self):
self.adyen.client.live_endpoint_prefix = "1797a841fbb37ca7-AdyenDemo"
recurring_version = self.baseUrl.split("/")[-1]
url = self.adyen.client._determine_api_url("live", self.baseUrl)
self.assertEqual(
url,
f"https://1797a841fbb37ca7-AdyenDemo-pal-live.adyenpayments.com"
f"/pal/servlet/Recurring/{recurring_version}",
)
self.adyen.client.live_endpoint_prefix = None
def test_base_url_live_environment_no_prefix_raises(self):
self.adyen.client.live_endpoint_prefix = None
self.assertRaises(
AdyenEndpointInvalidFormat,
self.adyen.client._determine_api_url,
"live",
self.baseUrl,
)
These tests are missing from all other service test files:
BalancePlatformTest.pyBinLookupTest.pyCapitalTest.pyCheckoutTest.pyDataProtectionTest.pyDisputesTest.pyLegalEntityManagementTest.pyManagementTest.pyModificationTest.py(payments)PaymentTest.pyPosMobileTest.pySessionAuthenticationTest.pyStoredValueTest.pyThirdPartyPayoutTest.pyTransfersTest.py
Proposed Change
Add the equivalent of test_base_url_test_environment, test_base_url_live_environment, and test_base_url_live_environment_no_prefix_raises to each service test file, adapting the expected URLs to match the service's URL pattern (PAL, checkout, balancePlatform, management, etc.).
Note: test_base_url_live_environment_no_prefix_raises only applies to services that require a live_endpoint_prefix (i.e. PAL and checkout-based services).
Benefit
Ensures that URL resolution for both test and live environments is explicitly verified for every service, catching regressions in _determine_api_url early.
- Ngôn ngữ chính
- Python
- Star
- 67
- Fork
- 51
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Adyen/adyen-python-api-library
-
[Bug] api_*_version override has no effect on PAL-based service URLsCó thể đã có người làm @cobanfurkanx đã nhận 13 ngày trước. Đang mởBug do not stale
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
[Feature]: Foreign Exchange APIĐang mởFeature
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Adyen/adyen-python-api-library#487 · 1 bình luận · 1 reaction ·
-
chore: consolidate package metadata into pyproject.toml (PEP 621)Có thể đã có người làm @erdemtuna đã nhận 195 ngày trước. Đang mởdo not stale
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
-
[Bug]: Unknown properties return NoneCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởdo not stale
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 48/100
Adyen/adyen-python-api-library#397 · 2 bình luận ·
-
do not stale Feature
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Adyen/adyen-python-api-library#395 · 1 reaction ·
Tất cả issue của Adyen/adyen-python-api-library
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
SublimeText/AdvancedNewFile#211 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Imbad0202/academic-research-skills#987 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add date of request to the UIĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
Pull-through from gcr.io returns 500 when pulling using podman/buildahCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởIssue Triage-Needed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
pulp/pulp_container#2581 ·
Maintainer thường phản hồi trong vòng 1 ngày