From 655e089b043df4fe9ab85dff876d3e7081baed16 Mon Sep 17 00:00:00 2001 From: Robert Date: Wed, 11 Dec 2024 14:51:40 -0500 Subject: [PATCH] glamr/test: add comments to some tests --- mibios/glamr/tests.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/mibios/glamr/tests.py b/mibios/glamr/tests.py index ce1bc60..7531454 100644 --- a/mibios/glamr/tests.py +++ b/mibios/glamr/tests.py @@ -415,7 +415,12 @@ def test_summaries(self): class DeepLinkTests(TestDataMixin, TestCase): + """ + Test reachable, internal links starting from frontpage up to certain depth + """ MAX_DEPTH = 2 + """ if 1, then only check the given URL, if 2 then check all links on given + page. """ href_pat = re.compile(r']*href="([/?][^"]+)"') """ pattern for local links """ @@ -450,6 +455,9 @@ def do_test_for_url(self, url, depth, parent): self.do_test_for_url(next_url, depth + 1, parent=url) def test_from_frontpage(self): + """ + test all pages reachable fron frontpage up to hard-coded depth + """ self.urls_tested = set() self.urls_too_deep = set() self.do_test_for_url(reverse('frontpage'), depth=1, parent=None) @@ -459,6 +467,12 @@ def test_from_frontpage(self): @tag('longrun') class VeryDeepLinkTests(DeepLinkTests): + """ + Test more URLs + + At depth 2: ~1400 URLs in 6 minutes + At depth 3: ~8100 URLs more + """ MAX_DEPTH = 3