MCPcopy Create free account
hub / github.com/grapeot/devin.cursorrules / test_validate_url

Method test_validate_url

tests/test_web_scraper.py:32–42  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

30 self.mock_session = self.mock_client_session
31
32 def test_validate_url(self):
33 # Test valid URLs
34 self.assertTrue(validate_url('https://example.com'))
35 self.assertTrue(validate_url('http://example.com/path?query=1'))
36 self.assertTrue(validate_url('https://sub.example.com:8080/path'))
37
38 # Test invalid URLs
39 self.assertFalse(validate_url('not-a-url'))
40 self.assertFalse(validate_url('http://'))
41 self.assertFalse(validate_url('https://'))
42 self.assertFalse(validate_url(''))
43
44 def test_parse_html(self):
45 # Test with empty or None input

Callers

nothing calls this directly

Calls 1

validate_urlFunction · 0.90

Tested by

no test coverage detected