Skip to content

Commit c4ee60a

Browse files
committed
fix tests
1 parent 1a7defa commit c4ee60a

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ async def main_manual():
2727
try:
2828
masked_email = await client.otp.sign_up_async(DeliveryMethod.EMAIL, "[email protected]")
2929
finally:
30-
await client.close_async()
30+
await client.close()
3131
```
3232

3333
## Requirements
@@ -147,7 +147,7 @@ async def otp_example():
147147
148148
user = {"name": "Desmond Copeland", "phone": "212-555-1234", "email": email}
149149
masked_address = await client.otp.sign_up_async(method=DeliveryMethod.EMAIL, login_id=email, user=user)
150-
150+
151151
# Verify the code
152152
jwt_response = await client.otp.verify_code_async(
153153
method=DeliveryMethod.EMAIL, login_id=email, code=value
@@ -200,7 +200,7 @@ async def magiclink_example():
200200
login_id="[email protected]",
201201
uri="http://myapp.com/verify-magic-link", # Set redirect URI here or via console
202202
)
203-
203+
204204
# Verify the magic link token
205205
jwt_response = await client.magiclink.verify_async(token=token)
206206
session_token = jwt_response[SESSION_TOKEN_NAME].get("jwt")
@@ -1252,7 +1252,7 @@ type doc
12521252
permission can_create: owner | parent.owner
12531253
permission can_edit: editor | can_create
12541254
permission can_view: viewer | can_edit
1255-
```
1255+
```
12561256
12571257
Descope SDK allows you to fully manage the schema and relations as well as perform simple (and not so simple) checks regarding the existence of relations.
12581258

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pytest = "8.3.5"
7171
coverage = { version = "^7.3.1", extras = ["toml"] }
7272

7373
[build-system]
74-
requires = ["poetry-core>=1.1.0"]
74+
requires = ["poetry-core>=1.6.0"]
7575
build-backend = "poetry.core.masonry.api"
7676

7777
[tool.coverage.run]

samples/async_demo_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ async def run_manual_cleanup_demo(self):
113113
print(f"❌ Authentication error: {e.error_message}")
114114
finally:
115115
# Always clean up resources
116-
await client.close_async()
116+
await client.close()
117117
print("🧹 Resources cleaned up manually")
118118

119119
async def run_session_management_demo(self):

tests/test_async.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def test_async_client_creation(self):
9292
self.assertTrue(hasattr(client.otp, "verify_code"))
9393

9494
# Verify client-level async methods
95-
self.assertTrue(hasattr(client, "close_async"))
95+
self.assertTrue(hasattr(client, "close"))
9696
self.assertTrue(hasattr(client, "validate_session_async"))
9797
self.assertTrue(hasattr(client, "refresh_session_async"))
9898
self.assertTrue(hasattr(client, "validate_and_refresh_session_async"))
@@ -622,12 +622,12 @@ async def test_async_client_close(self):
622622
"""Test async client close method."""
623623
client = AsyncDescopeClient(project_id=self.project_id)
624624

625-
# Close should not raise an exception
626-
await client.close_async()
627-
628625
# Verify the method exists and is callable
629-
self.assertTrue(hasattr(client, "close_async"))
630-
self.assertTrue(callable(client.close_async))
626+
self.assertTrue(hasattr(client, "close"))
627+
self.assertTrue(callable(client.close))
628+
629+
# Close should not raise an exception
630+
await client.close()
631631

632632

633633
if __name__ == "__main__":

0 commit comments

Comments
 (0)