Skip to content

Commit 365263d

Browse files
committed
chore(release): v2.1.2
1 parent e6559df commit 365263d

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "fds.sdk.utils"
3-
version = "2.1.1"
3+
version = "2.1.2"
44
description = "Utilities for interacting with FactSet APIs."
55
authors = ["FactSet Research Systems"]
66
license = "Apache-2.0"

src/fds/sdk/utils/authentication/constants.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import platform
22

3-
43
class CONSTS:
54
# confidential client assertion JWT
65
CC_JWT_NOT_BEFORE_SECS = 5
@@ -28,7 +27,7 @@ class CONSTS:
2827
# default values
2928
FACTSET_WELL_KNOWN_URI = "https://auth.factset.com/.well-known/openid-configuration"
3029

31-
USER_AGENT = f"fds-sdk/python/utils/2.1.1 ({platform.system()}; Python {platform.python_version()})"
30+
USER_AGENT = f"fds-sdk/python/utils/2.1.2 ({platform.system()}; Python {platform.python_version()})"
3231

3332

3433
CONSTS = CONSTS()

tests/fds/sdk/utils/authentication/test_confidential.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import json
22
import logging
3-
import platform
4-
from unittest.mock import ANY, mock_open
3+
from unittest.mock import mock_open
54

65
import pytest
76

@@ -13,6 +12,7 @@
1312
ConfidentialClientError,
1413
ConfigurationError,
1514
OAuth2Client,
15+
constants
1616
)
1717

1818

@@ -203,7 +203,7 @@ def json(self):
203203
url="https://auth.factset.com/.well-known/openid-configuration",
204204
proxies={"http": "http://my:pass@test.test.test", "https": "http://my:pass@test.test.test"},
205205
verify=False,
206-
headers={"User-Agent": f"fds-sdk/python/utils/2.1.1 ({platform.system()}; Python {platform.python_version()})"},
206+
headers={"User-Agent": constants.CONSTS.USER_AGENT},
207207
)
208208

209209

@@ -233,7 +233,7 @@ def json(self):
233233
url=auth_test,
234234
proxies=None,
235235
verify=True,
236-
headers={"User-Agent": f"fds-sdk/python/utils/2.1.1 ({platform.system()}; Python {platform.python_version()})"},
236+
headers={"User-Agent": constants.CONSTS.USER_AGENT},
237237
)
238238
assert client
239239

@@ -378,7 +378,7 @@ def test_get_access_token_fetch(client, mocker):
378378
headers={
379379
"Accept": "application/json",
380380
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
381-
"User-Agent": f"fds-sdk/python/utils/2.1.1 ({platform.system()}; Python {platform.python_version()})",
381+
"User-Agent": constants.CONSTS.USER_AGENT,
382382
},
383383
)
384384

0 commit comments

Comments
 (0)