From aa24af73378d83b3ec1e5a997ed5727209af4bee Mon Sep 17 00:00:00 2001 From: Juan Carlos Date: Wed, 22 Jan 2025 21:02:25 -0300 Subject: [PATCH] feat: add tests WIP --- tests/_sync/test_gotrue_admin_api.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/_sync/test_gotrue_admin_api.py b/tests/_sync/test_gotrue_admin_api.py index 6f81706b..a3069882 100644 --- a/tests/_sync/test_gotrue_admin_api.py +++ b/tests/_sync/test_gotrue_admin_api.py @@ -497,3 +497,24 @@ def test_list_factors(): factors = client._list_factors() assert factors assert isinstance(factors.totp, list) and isinstance(factors.phone, list) + + +def test_start_auto_refresh_token(): + credentials = mock_user_credentials() + client = auth_client() + client._auto_refresh_token = True + client.sign_up( + { + "email": credentials.get("email"), + "password": credentials.get("password"), + } + ) + + client.sign_in_with_password( + { + "email": credentials.get("email"), + "password": credentials.get("password"), + } + ) + + assert client._start_auto_refresh_token(2.0) is None