Skip to content

Commit 768c84b

Browse files
committed
Deprecate API_VERSION
1 parent 25afd0c commit 768c84b

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

Adyen/settings.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/bin/python
2-
31
BASE_PAL_URL = "https://pal-{}.adyen.com/pal/servlet"
42
BASE_HPP_URL = "https://{}.adyen.com/hpp"
53
ENDPOINT_CHECKOUT_TEST = "https://checkout-test.adyen.com"
@@ -9,3 +7,11 @@
97
API_CHECKOUT_UTILITY_VERSION = "v1"
108
API_PAYOUT_VERSION = "v30"
119
API_RECURRING_VERSION = "v25"
10+
11+
12+
@property
13+
def API_VERSION():
14+
import warnings
15+
warnings.warn("this constant is deprecated use API_PAYOUT_VERSION",
16+
DeprecationWarning)
17+
return "v30"

test/CheckoutTest.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
import unittest
33
from BaseTest import BaseTest
44

5-
from Adyen.exceptions import AdyenEndpointInvalidFormat
6-
75

86
class TestCheckout(unittest.TestCase):
97
adyen = Adyen.Adyen()

test/CheckoutUtilityTest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import Adyen
22
import unittest
33
from BaseTest import BaseTest
4-
import pprint
54

65

76
class TestCheckoutUtility(unittest.TestCase):

test/DetermineEndpointTest.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import Adyen
22
import unittest
33
from BaseTest import BaseTest
4-
54
from Adyen.exceptions import AdyenEndpointInvalidFormat
65

76

@@ -21,7 +20,6 @@ def test_checkout_api_url_custom(self):
2120
"live.adyenpayments.com/checkout/v40/payments")
2221

2322
def test_checkout_api_url(self):
24-
2523
self.client.live_endpoint_prefix = None
2624
url = self.adyen.client._determine_checkout_url("test",
2725
"paymentsDetails")
@@ -47,5 +45,4 @@ def test_payments_invalid_platform(self):
4745
try:
4846
result = self.adyen.checkout.payments(request)
4947
except AdyenEndpointInvalidFormat as error:
50-
print("the error" + str(error.__class__.__name__))
51-
self.assertIsNotNone("dfasdf")
48+
self.assertIsNotNone(error)

0 commit comments

Comments
 (0)