Browse Source

Address code review feedback - simplify XSS assertion

Co-authored-by: cadtoolbox <12723486+cadtoolbox@users.noreply.github.com>
copilot-swe-agent[bot] 3 months ago
parent
commit
0cc40088bf
1 changed files with 2 additions and 1 deletions
  1. 2 1
      backend/tests/unit/services/test_email_service.py

+ 2 - 1
backend/tests/unit/services/test_email_service.py

@@ -159,4 +159,5 @@ class TestEmailTemplateFormatting:
 
 
         # Verify that script tags are escaped
         # Verify that script tags are escaped
         assert "&lt;script&gt;" in html_body
         assert "&lt;script&gt;" in html_body
-        assert "<script>" not in html_body or html_body.count("<script>") == 0  # No unescaped script tags
+        # Verify no unescaped script tags
+        assert "<script>" not in html_body