Skip to content

Commit

Permalink
temp fix for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adbar committed Jul 13, 2023
1 parent 3b376e9 commit 6ada75c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/unit_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -909,12 +909,12 @@ def test_extraction():
base_url = "https://example.org"
htmlstring = '<html><body><a href="https://example.org/page1"/><a href="https://example.org/page1/"/><a href="https://test.org/page1"/></body></html>'
links, links_priority = filter_links(htmlstring, base_url)
assert links == ["https://example.org/page1"] and not links_priority
assert len(links) == 1 and not links_priority
# link filtering with relative URLs
url = "https://example.org/page1.html"
htmlstring = '<html><body><a href="/subpage1"/><a href="/subpage1/"/><a href="https://test.org/page1"/></body></html>'
links, links_priority = filter_links(htmlstring, url=url)
assert links == ["https://example.org/subpage1"] and not links_priority
assert len(links) == 1 and not links_priority


def test_cli():
Expand Down

0 comments on commit 6ada75c

Please sign in to comment.