Skip to content

Commit 45c8ff5

Browse files
committed
fix: UA test
1 parent 55ec626 commit 45c8ff5

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

tests/test_serverless/test_modules/test_logger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def test_log_job_id(self):
120120
logger.log("test_message", "INFO", job_id)
121121

122122
mock_print.assert_called_once_with(
123-
"'INFO | test_job_id | test_message', flush=True",
123+
"'INFO | test_job_id | test_message'",
124124
flush=True
125125
)
126126

tests/test_user_agent.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ def test_user_agent_with_integration(
3838
self, mock_python_version, mock_machine, mock_release, mock_system):
3939
"""Test the User-Agent string with an integration method specified."""
4040
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
41+
42+
os.environ['RUNPOD_UA_INTEGRATION'] = 'SkyPilot'
4143
self.assertEqual(construct_user_agent(), expected_ua)
44+
os.environ.pop('RUNPOD_UA_INTEGRATION')
4245

4346
assert mock_python_version.called
4447
assert mock_machine.called

0 commit comments

Comments
 (0)