Skip to content

Commit 665232b

Browse files
committed
fix(python): Used correct client variable names & removed a problematic datetime parser.
Signed-off-by: Tom Dent <tomdenty1@gmail.com>
1 parent c53e5e6 commit 665232b

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

flipt-python/flipt/authentication/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ def authenticate(self, headers: dict[str, str]) -> None:
5555
try:
5656
response_data = response.json()
5757
self.token = response_data.get("clientToken")
58-
token_expiry_iso8601 = response_data.get("expiresAt")
59-
self.token_expiry = datetime.fromisoformat(token_expiry_iso8601).timestamp()
58+
self.token_expiry = response_data.get("expiresAt")
6059
except (KeyError, ValueError) as e:
6160
raise RuntimeError(f"Failed parsing authentication response: {e}")
6261

flipt-python/tests/authentication/test_async_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import pytest
22

3-
from flipt.async_client import AsyncFliptClient
3+
from flipt.evaluation import EvaluationRequest
44

55
async def test_variant(async_k8s_flipt_client):
6-
variant = await async_flipt_client.evaluation.variant(
6+
variant = await async_k8s_flipt_client.evaluation.variant(
77
EvaluationRequest(
88
namespace_key="default",
99
flag_key="flag1",

flipt-python/tests/authentication/test_sync_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import pytest
22

3-
from flipt.evaluation import BatchEvaluationRequest, EvaluationRequest
3+
from flipt.evaluation import EvaluationRequest
44

55

66
def test_variant(sync_k8s_flipt_client):
7-
variant = sync_flipt_client.evaluation.variant(
7+
variant = sync_k8s_flipt_client.evaluation.variant(
88
EvaluationRequest(
99
namespace_key="default",
1010
flag_key="flag1",

0 commit comments

Comments
 (0)