From 010285126ca6ac2e702a1df1c6b8e5f2096d7950 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Jul 2020 17:27:19 -0500 Subject: [PATCH] Bump cuenca-validations from 0.2.5 to 0.3.0 (#24) * Bump cuenca-validations from 0.2.5 to 0.3.0 Bumps [cuenca-validations](https://github.com/cuenca-mx/cuenca-validations) from 0.2.5 to 0.3.0. - [Release notes](https://github.com/cuenca-mx/cuenca-validations/releases) - [Commits](https://github.com/cuenca-mx/cuenca-validations/compare/0.2.5...0.3.0) Signed-off-by: dependabot[bot] * fix-imports * fix-date Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Glen --- cuenca/resources/api_keys.py | 2 +- cuenca/resources/base.py | 2 +- cuenca/resources/transfers.py | 4 ++-- setup.py | 2 +- tests/resources/test_api_keys.py | 8 +++----- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/cuenca/resources/api_keys.py b/cuenca/resources/api_keys.py index 4c453c7e..b4668501 100644 --- a/cuenca/resources/api_keys.py +++ b/cuenca/resources/api_keys.py @@ -1,7 +1,7 @@ import datetime as dt from typing import ClassVar, Optional, cast -from cuenca_validations import ApiKeyQuery +from cuenca_validations.types import ApiKeyQuery from pydantic.dataclasses import dataclass from ..http import session diff --git a/cuenca/resources/base.py b/cuenca/resources/base.py index a080570a..612d1486 100644 --- a/cuenca/resources/base.py +++ b/cuenca/resources/base.py @@ -3,7 +3,7 @@ from typing import ClassVar, Dict, Generator, Optional, Union from urllib.parse import urlencode -from cuenca_validations import ( +from cuenca_validations.types import ( QueryParams, SantizedDict, Status, diff --git a/cuenca/resources/transfers.py b/cuenca/resources/transfers.py index da9e826d..2d1f5359 100644 --- a/cuenca/resources/transfers.py +++ b/cuenca/resources/transfers.py @@ -2,13 +2,13 @@ from typing import ClassVar, List, Optional, Union, cast from clabe import Clabe -from cuenca_validations import ( - DictStrAny, +from cuenca_validations.types import ( PaymentCardNumber, StrictPositiveInt, TransferNetwork, TransferQuery, ) +from cuenca_validations.typing import DictStrAny from pydantic import BaseModel, StrictStr from pydantic.dataclasses import dataclass from requests import HTTPError diff --git a/setup.py b/setup.py index 081afb2b..a8987a4e 100644 --- a/setup.py +++ b/setup.py @@ -34,7 +34,7 @@ install_requires=[ 'requests==2.24.0', 'pydantic==1.5.1', - 'cuenca-validations==0.2.5', + 'cuenca-validations==0.3.0', 'dataclasses>=0.7;python_version<"3.7"', ], setup_requires=['pytest-runner'], diff --git a/tests/resources/test_api_keys.py b/tests/resources/test_api_keys.py index 648142df..66a3a63c 100644 --- a/tests/resources/test_api_keys.py +++ b/tests/resources/test_api_keys.py @@ -37,15 +37,13 @@ def test_api_key_deactivate(): def test_api_key_to_dict(): - created = dt.datetime.utcnow() + created = dt.datetime.now() + date = created.astimezone(dt.timezone.utc).isoformat() api_key: ApiKey = ApiKey( id='12345', secret='********', created_at=created, deactivated_at=None, ) api_key_dict = dict( - id='12345', - secret='********', - created_at=created.isoformat(), - deactivated_at=None, + id='12345', secret='********', created_at=date, deactivated_at=None, ) assert api_key_dict == api_key.to_dict()