Skip to content

Commit a99a67d

Browse files
committed
Update test_user_agent.py
1 parent 313d739 commit a99a67d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tests/test_user_agent.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from unittest.mock import patch
55
import os
66

7+
from runpod import __version__ as runpod_version
78
from runpod.user_agent import construct_user_agent
89

910

@@ -20,7 +21,7 @@ def test_user_agent_without_integration(
2021
if 'RUNPOD_UA_INTEGRATION' in os.environ:
2122
del os.environ['RUNPOD_UA_INTEGRATION']
2223

23-
expected_ua = "RunPod-Python-SDK/0.1.0 (Windows 10; AMD64) Language/Python 3.8.10"
24+
expected_ua = f"RunPod-Python-SDK/{runpod_version} (Windows 10; AMD64) Language/Python 3.8.10" # pylint: disable=line-too-long
2425
self.assertEqual(construct_user_agent(), expected_ua)
2526

2627
assert mock_python_version.called
@@ -36,7 +37,7 @@ def test_user_agent_without_integration(
3637
def test_user_agent_with_integration(
3738
self, mock_python_version, mock_machine, mock_release, mock_system):
3839
"""Test the User-Agent string with an integration method specified."""
39-
expected_ua = "RunPod-Python-SDK/0.1.0 (Linux 5.4; x86_64) Language/Python 3.9.5 Integration/SkyPilot" # pylint: disable=line-too-long
40+
expected_ua = f"RunPod-Python-SDK/{runpod_version} (Linux 5.4; x86_64) Language/Python 3.9.5 Integration/SkyPilot" # pylint: disable=line-too-long
4041
self.assertEqual(construct_user_agent(), expected_ua)
4142

4243
assert mock_python_version.called

0 commit comments

Comments
 (0)