Skip to content

Commit

Permalink
Merge pull request #67 from mercadopago/feature/bump-sdk-version
Browse files Browse the repository at this point in the history
Bump version to 2.2.1
  • Loading branch information
romerosilva-meli authored Aug 21, 2023
2 parents 466528c + 1b679b8 commit 73061bb
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mercadopago/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Config:
"""

def __init__(self):
self.__version = "2.2.0"
self.__version = "2.2.1"
self.__user_agent = "MercadoPago Python SDK v" + self.__version
self.__product_id = "bc32bpftrpp001u8nhlg"
self.__tracking_id = "platform:" + platform.python_version()
Expand Down
2 changes: 1 addition & 1 deletion mercadopago/resources/preference.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ def search(self, filters=None, request_options=None):
"""

return self._get(uri="/checkout/preferences/search", filters=filters,
request_options=request_options)
request_options=request_options)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

setup(
name="mercadopago",
version="2.2.0",
version="2.2.1",
description="Mercadopago SDK module for Payments integration",
author="Mercado Pago SDK",
author_email="mp_sdk@mercadopago.com",
Expand Down
5 changes: 5 additions & 0 deletions tests/test_preference.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""
import unittest

import time
import mercadopago


Expand Down Expand Up @@ -33,18 +34,22 @@ def test_all(self):
preference_saved = self.sdk.preference().create(preference_object)
self.assertEqual(preference_saved["status"], 201)

time.sleep(1)

preference_object["items"][0]["title"] = "Testando 1 2 3"

preference_update = self.sdk.preference().update(
preference_saved["response"]["id"], preference_object)
self.assertEqual(preference_update["status"], 200)

time.sleep(1)
preference_saved = self.sdk.preference().get(
preference_saved["response"]["id"])

self.assertEqual(preference_saved["response"]["items"][0]["title"],
preference_object["items"][0]["title"])

time.sleep(1)
preference_saved = self.sdk.preference().search()

self.assertEqual(preference_saved["response"]["elements"][0]["items"][0],
Expand Down
2 changes: 1 addition & 1 deletion tests/test_subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def test_create_subscriptions_without_a_plan(self):
@classmethod
def create_card_token(cls):
card_token_object = {
"card_number": "4074090000000004",
"card_number": "5031433215406351",
"security_code": "123",
"expiration_year": datetime.now().strftime("%Y"),
"expiration_month": "12",
Expand Down

0 comments on commit 73061bb

Please sign in to comment.