Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Test] Add baseUrl environment tests to all service test files

オープン
#475 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

@gourabsingha1 がすでに取り組んでいます。

2026年6月22日 から。

  • #488 @gourabsingha1 による — オープン

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
python
領域
api, testing-qa

調査の方向性

RecurringTest.py から始め、その3つの baseUrl テストを、一覧にあるサービスのテストファイルと比較します。各サービスの URL パターンを使って、テスト環境とライブ環境について同等のカバレッジを追加し、プレフィックスなしのケースは PAL と checkout ベースのサービスにのみ適用します。影響を受けるサービスのテストを実行し、一覧にあるすべてのファイルに適切なカバレッジがあることを確認します。

索引モデルが issue の本文から書いたものです。

説明

do not stale Test

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.py
  • BinLookupTest.py
  • CapitalTest.py
  • CheckoutTest.py
  • DataProtectionTest.py
  • DisputesTest.py
  • LegalEntityManagementTest.py
  • ManagementTest.py
  • ModificationTest.py (payments)
  • PaymentTest.py
  • PosMobileTest.py
  • SessionAuthenticationTest.py
  • StoredValueTest.py
  • ThirdPartyPayoutTest.py
  • TransfersTest.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.

主要言語
Python
スター
68
フォーク
51
平均マージ
2時間 3分
マージ済み PR(30日)
2

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Adyen/adyen-python-api-library のほかの issue

Adyen/adyen-python-api-library の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。