Skip to content

Commit

Permalink
Bump cuenca-validations from 0.2.5 to 0.3.0 (#24)
Browse files Browse the repository at this point in the history
* 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](cuenca-mx/cuenca-validations@0.2.5...0.3.0)

Signed-off-by: dependabot[bot] <[email protected]>

* fix-imports

* fix-date

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Glen <[email protected]>
  • Loading branch information
dependabot[bot] and Gleekzone authored Jul 7, 2020
1 parent 4ba9a34 commit 0102851
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion cuenca/resources/api_keys.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion cuenca/resources/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions cuenca/resources/transfers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down
8 changes: 3 additions & 5 deletions tests/resources/test_api_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 0102851

Please sign in to comment.