Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_is_url_without_path_query_or_fragment(self):
is_url_without_path_query_or_fragment = \
serpextract._is_url_without_path_query_or_fragment
results = (
('http://www.something.com', True),
('http://www.something.com/', True),
('http://www.something.com/path', False),
('http://www.something.com/?query=true', False),
('http://www.something.com/#fragment', False),
('http://www.something.com/path?query=True#fragment', False),
)
for url, expected in results:
parts = urlparse(url)
actual = is_url_without_path_query_or_fragment(parts)
self.assertEqual(actual, expected)