Skip to content

Commit 7c71324

Browse files
committed
Update SANDBOX_HOST to use sandbox.cuenca.com, remove Queryable from PasswordReset resource, and add test cassette for password reset creation.
1 parent 8663f46 commit 7c71324

4 files changed

Lines changed: 41 additions & 16 deletions

File tree

cuenca/http/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from ..version import API_VERSION, CLIENT_VERSION
1919

2020
API_HOST = 'api.cuenca.com'
21-
SANDBOX_HOST = 'api.cuenca.com'
21+
SANDBOX_HOST = 'sandbox.cuenca.com'
2222

2323

2424
class Session:

cuenca/resources/password_resets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
from pydantic_extra_types.coordinate import Coordinate
88

99
from ..http import Session, session as global_session
10-
from .base import Creatable, Queryable, Retrievable
10+
from .base import Creatable
1111

1212

13-
class PasswordReset(Creatable, Retrievable, Queryable):
13+
class PasswordReset(Creatable):
1414
_resource: ClassVar = 'password_resets'
1515

1616
platform_id: str
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
interactions:
2+
- request:
3+
body: '{"location": {"latitude": 19.432608, "longitude": -99.133209}}'
4+
headers:
5+
Accept:
6+
- '*/*'
7+
Accept-Encoding:
8+
- gzip, deflate
9+
Authorization:
10+
- DUMMY
11+
Connection:
12+
- keep-alive
13+
Content-Length:
14+
- '62'
15+
Content-Type:
16+
- application/json
17+
User-Agent:
18+
- cuenca-python/2.1.20.dev1
19+
X-Cuenca-Api-Version:
20+
- '2020-03-19'
21+
method: POST
22+
uri: https://api.stage.cuenca.com/password_resets
23+
response:
24+
body:
25+
string: '{"id":"PR9tshvjCQT0KNEaW2MGCxFQ","identity_id":"69fccbd11cb7a08a26d59a2a","platform_id":"PTZbBlk__kQt-wfwZP5nwA9A","created_at":"2026-05-07T17:28:48.176876","updated_at":"2026-05-07T17:28:49.400276","deactivated_at":null,"verification_id":"VE9Wfa1nYLQSmJPH44Egh9UQ","flow_id":"69f8e0bc2a21320eeff89b37","mati_verification_id":"69fccbd11cb7a08a26d59a2c","status":"created","provider_url":null}'
26+
headers:
27+
Connection:
28+
- keep-alive
29+
Content-Length:
30+
- '392'
31+
Content-Type:
32+
- application/json
33+
Date:
34+
- Wed, 07 May 2026 17:28:49 GMT
35+
status:
36+
code: 201
37+
message: Created
38+
version: 1

tests/resources/test_password_resets.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,3 @@ def test_password_resets_create() -> None:
1313
),
1414
)
1515
assert password_reset.id.startswith('PR')
16-
17-
18-
@pytest.mark.vcr
19-
def test_password_resets_retrieve() -> None:
20-
password_reset = PasswordReset.retrieve('PRFOO')
21-
assert password_reset.id
22-
assert password_reset.flow_id
23-
24-
25-
@pytest.mark.vcr
26-
def test_password_resets_all() -> None:
27-
items = list(PasswordReset.all())
28-
assert items

0 commit comments

Comments
 (0)