mirror of
https://github.com/elementalsouls/Claude-BugHunter.git
synced 2026-11-24 20:30:23 +01:00
14 lines
563 B
Python
14 lines
563 B
Python
import unittest
|
|
|
|
from scope import Scope
|
|
|
|
|
|
class MalformedTargetTests(unittest.TestCase):
|
|
def test_malformed_urls_are_out_of_scope_without_interrupting_batch(self):
|
|
rule = Scope(["example.test"])
|
|
for malformed in ("https://[example.test", "https://example.test]/"):
|
|
with self.subTest(malformed=malformed):
|
|
self.assertFalse(rule.in_scope_host(malformed))
|
|
self.assertEqual(rule.reject_reason(malformed), "could not parse host")
|
|
self.assertTrue(rule.in_scope_host("https://api.example.test/"))
|