From 095883ca547f0d51522c1758abbc6fc21f638d26 Mon Sep 17 00:00:00 2001 From: Media <12145726+rihp@users.noreply.github.com> Date: Sat, 29 Apr 2023 19:16:16 +0200 Subject: [PATCH] Removing duplicate tests browse_tests (#3535) Co-authored-by: Nicholas Tindle --- tests/browse_tests.py | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 tests/browse_tests.py diff --git a/tests/browse_tests.py b/tests/browse_tests.py deleted file mode 100644 index 90692d88..00000000 --- a/tests/browse_tests.py +++ /dev/null @@ -1,29 +0,0 @@ -import os -import sys -import unittest - -from bs4 import BeautifulSoup - -sys.path.append(os.path.abspath("../scripts")) - -from browse import extract_hyperlinks - - -class TestBrowseLinks(unittest.TestCase): - """Unit tests for the browse module functions that extract hyperlinks.""" - - def test_extract_hyperlinks(self): - """Test the extract_hyperlinks function with a simple HTML body.""" - body = """ - - Google - Foo -
Some other crap
- - """ - soup = BeautifulSoup(body, "html.parser") - links = extract_hyperlinks(soup, "http://example.com") - self.assertEqual( - links, - [("Google", "https://google.com"), ("Foo", "http://example.com/foo.html")], - )