1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
E       AssertionError: assert 'removed' in <html><head></head><body><h1>Hi</h1>\n<ul>\n<li>this</li>\n<li>is</li>\n<li>a</li>\n</ul>\n<p>Bullet.</p>\n<p><a href="https:...p>\n<p><a href="https://russell.ballestrini.net/about/">internal absolute</a></p>\n<p>[link removed]</p>\n\n\n</body></html>

remarkbox/test_render.py:88: AssertionError


















-------------








_______________________________________________ TestRenderMarkdown.test_link_protection_enabled ________________________________________________

self = <remarkbox.test_render.TestRenderMarkdown testMethod=test_link_protection_enabled>

    def test_link_protection_enabled(self):
        raw_html = markdown_to_raw_html(SAMPLE_MARKDOWN)
        namespace = Namespace("russell.ballestrini.net")
        namespace.subscription_type = "production"
        namespace.link_protection = True
        cleaner = make_cleaner_from_namespace(namespace)
        clean_html = clean_raw_html(raw_html, cleaner)
        self.assertIn(
            '<a href="https://russell.ballestrini.net/about/">internal relative</a>',
>           clean_html,
        )
E       AssertionError: '<a href="https://russell.ballestrini.net/about/">internal relative</a>' not found in <html><head></head><body><h1>Hi</h1>
E       <ul>
E       <li>this</li>
E       <li>is</li>
E       <li>a</li>
E       </ul>
E       <p>Bullet.</p>
E       <p><a href="https://russell.ballestrini.net/about/">internal relative</a></p>
E       <p><a href="https://russell.ballestrini.net/about/">internal absolute</a></p>
E       <p>[link removed]</p>
E       
E       
E       </body></html>

remarkbox/test_render.py:89: AssertionError