|
4 | 4 | import pytest |
5 | 5 | from socketdev import socketdev |
6 | 6 |
|
7 | | -from socketsecurity.core import Core |
| 7 | +from socketsecurity.core import Core, _humanize_alert_type |
8 | 8 | from socketsecurity.core.classes import Issue, Package |
9 | 9 | from socketsecurity.core.socket_config import SocketConfig |
10 | 10 |
|
@@ -326,23 +326,18 @@ def test_get_license_text_via_purl_uses_org_scoped_endpoint(self, core, mock_sdk |
326 | 326 |
|
327 | 327 | class TestHumanizeAlertType: |
328 | 328 | def test_humanizes_camel_case(self): |
329 | | - from socketsecurity.core import _humanize_alert_type |
330 | 329 | assert _humanize_alert_type("gptDidYouMean") == "Gpt Did You Mean" |
331 | 330 |
|
332 | 331 | def test_humanizes_single_word(self): |
333 | | - from socketsecurity.core import _humanize_alert_type |
334 | 332 | assert _humanize_alert_type("malware") == "Malware" |
335 | 333 |
|
336 | 334 | def test_humanizes_pascal_case(self): |
337 | | - from socketsecurity.core import _humanize_alert_type |
338 | 335 | assert _humanize_alert_type("UnsafeShellAccess") == "Unsafe Shell Access" |
339 | 336 |
|
340 | 337 | def test_empty_input_returns_empty_string(self): |
341 | | - from socketsecurity.core import _humanize_alert_type |
342 | 338 | assert _humanize_alert_type("") == "" |
343 | 339 |
|
344 | 340 | def test_handles_acronyms_conservatively(self): |
345 | 341 | """Adjacent capitals are kept together: SQLInjection -> 'SQL Injection'.""" |
346 | | - from socketsecurity.core import _humanize_alert_type |
347 | 342 | assert _humanize_alert_type("SQLInjection") == "SQL Injection" |
348 | 343 |
|
0 commit comments