Skip to content

Commit 9236e0a

Browse files
Fix linting errors: remove escaped quotes, prefix unused app variables, fix indentation, remove extra blank line
1 parent e359bba commit 9236e0a

5 files changed

Lines changed: 13 additions & 14 deletions

File tree

src/tests/ContentProcessorAPI/libs/test_cosmos_db_helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def test_delete_document(mock_certifi, mock_mongo_client):
167167
mock_result = MagicMock()
168168
mock_container.delete_one.return_value = mock_result
169169

170-
helper.delete_document(\"test_id\")
170+
helper.delete_document("test_id")
171171
mock_container.delete_one.assert_called_once_with({"Id": "test_id"})
172172

173173

src/tests/ContentProcessorWorkflow/libs/test_application_base_extended.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def test_initialization_with_app_config_endpoint(self, tmp_path, monkeypatch):
8181
mock_app_config_instance = Mock()
8282
mock_app_config.return_value = mock_app_config_instance
8383

84-
app = ConcreteApplication(env_file_path=str(env_file))
84+
_app = ConcreteApplication(env_file_path=str(env_file))
8585

8686
mock_app_config.assert_called_once()
8787
mock_app_config_instance.read_and_set_environmental_variables.assert_called_once()
@@ -101,7 +101,7 @@ def test_initialization_with_logging_enabled(self, tmp_path, monkeypatch):
101101

102102
mock_cred.return_value = Mock()
103103

104-
app = ConcreteApplication(env_file_path=str(env_file))
104+
_app = ConcreteApplication(env_file_path=str(env_file))
105105

106106
# Verify logging was configured
107107
mock_logging.assert_called_once()
@@ -122,7 +122,7 @@ def test_initialization_without_logging(self, tmp_path, monkeypatch):
122122

123123
mock_cred.return_value = Mock()
124124

125-
app = ConcreteApplication(env_file_path=str(env_file))
125+
_app = ConcreteApplication(env_file_path=str(env_file))
126126

127127
# Verify logging was NOT configured
128128
mock_logging.assert_not_called()
@@ -158,7 +158,7 @@ def test_load_env_with_explicit_path(self, tmp_path):
158158
patch('libs.base.application_base.AgentFrameworkSettings'), \
159159
patch('libs.base.application_base.load_dotenv') as mock_load_dotenv:
160160

161-
app = ConcreteApplication(env_file_path=str(env_file))
161+
_app = ConcreteApplication(env_file_path=str(env_file))
162162

163163
# Verify load_dotenv was called at least once
164164
assert mock_load_dotenv.call_count >= 1
@@ -257,7 +257,7 @@ def test_empty_app_config_endpoint_skipped(self, tmp_path, monkeypatch):
257257
patch('libs.base.application_base.AppConfigurationHelper') as mock_app_config, \
258258
patch('libs.base.application_base.AgentFrameworkSettings'):
259259

260-
app = ConcreteApplication(env_file_path=str(env_file))
260+
_app = ConcreteApplication(env_file_path=str(env_file))
261261

262262
# AppConfigurationHelper should not be called with empty endpoint
263263
mock_app_config.assert_not_called()
@@ -274,7 +274,7 @@ def test_none_app_config_endpoint_skipped(self, tmp_path, monkeypatch):
274274
patch('libs.base.application_base.AppConfigurationHelper') as mock_app_config, \
275275
patch('libs.base.application_base.AgentFrameworkSettings'):
276276

277-
app = ConcreteApplication(env_file_path=str(env_file))
277+
_app = ConcreteApplication(env_file_path=str(env_file))
278278

279279
# AppConfigurationHelper should not be called
280280
mock_app_config.assert_not_called()

src/tests/ContentProcessorWorkflow/libs/test_final_80_percent_push.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def test_get_azure_credential_with_all_env_vars(self):
221221
'AZURE_TENANT_ID': 'test-tenant-id',
222222
'AZURE_CLIENT_SECRET': 'test-secret'
223223
}), \
224-
patch('utils.credential_util.DefaultAzureCredential') as mock_cred:
224+
patch('utils.credential_util.DefaultAzureCredential') as mock_cred:
225225

226226
mock_cred.return_value = Mock()
227227

src/tests/ContentProcessorWorkflow/libs/test_push_to_80_percent.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def run(self):
2626
mock_env_config.return_value.app_config_endpoint = ""
2727

2828
# Test with explicit path
29-
app = TestApp(env_file_path="/custom/path/.env")
29+
_app = TestApp(env_file_path="/custom/path/.env")
3030

3131
# Should have loaded from explicit path
3232
mock_load_dotenv.assert_called_with(dotenv_path="/custom/path/.env")
@@ -53,7 +53,7 @@ def run(self):
5353
mock_env_config.return_value.app_config_endpoint = "https://myconfig.azconfig.io"
5454
mock_config.return_value.app_logging_enable = False
5555

56-
app = TestApp()
56+
_app = TestApp()
5757

5858
# Should have created AppConfigurationHelper
5959
assert mock_app_config.called
@@ -85,7 +85,7 @@ def run(self):
8585
config_instance.app_logging_level = "DEBUG"
8686
mock_config.return_value = config_instance
8787

88-
app = TestApp()
88+
_app = TestApp()
8989

9090
# Should have configured logging
9191
mock_logging.assert_called_once()

src/tests/ContentProcessorWorkflow/libs/test_ultra_focused_80.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ def test_load_env_returns_path(self):
8484
"""Test that _load_env returns the loaded path"""
8585
from libs.base.application_base import ApplicationBase
8686

87-
8887
class TestApp(ApplicationBase):
8988
def initialize(self):
9089
pass
@@ -102,7 +101,7 @@ def run(self):
102101
mock_config.return_value.app_logging_enable = False
103102

104103
# Create app with no explicit env path
105-
app = TestApp()
104+
_app = TestApp()
106105

107106
# Should have called load_dotenv
108107
assert mock_load.called
@@ -119,7 +118,7 @@ def test_validate_authentication_with_kubernetes(self):
119118
'KUBERNETES_SERVICE_HOST': 'kubernetes.default.svc',
120119
'IDENTITY_ENDPOINT': 'http://169.254.169.254/metadata/identity'
121120
}), \
122-
patch('utils.credential_util.get_azure_credential') as mock_cred:
121+
patch('utils.credential_util.get_azure_credential') as mock_cred:
123122

124123
mock_cred.return_value = Mock()
125124

0 commit comments

Comments
 (0)