Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mamico committed Mar 20, 2024
1 parent 689be20 commit a197e7d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/redturtle/volto/linkchecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,15 @@ def check_content(self, content, ttl=3600 * 6):
external_links.append((link, status))
self._outgoing_links[uuid] = (datetime.now(), external_links + internal_links)

# def get_page_with_broken_links(self):
# """
# :return: iterator with items as
# (uid, [(link1, status1), link2, status2), ...])
# """
# for uid, (_, links) in self._outgoing_links.items():
# broken_links = [item for item in links if item[1] != 200]
# if broken_links:
# yield (uid, broken_links)
def get_page_with_broken_links(self):
"""
:return: iterator with items as
(uid, [(link1, status1), link2, status2), ...])
"""
for uid, (_, links) in self._outgoing_links.items():
broken_links = [item for item in links if item[1] != 200]
if broken_links:
yield (uid, broken_links)

def get_rows(self, broken=True):
"""
Expand Down

0 comments on commit a197e7d

Please sign in to comment.