Mercurial > silorider
comparison tests/test_silos_mastodon.py @ 30:53de06c2f97d
Fix Mastodon tests, add some logging for media attachments
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Wed, 19 Apr 2023 12:49:50 -0700 |
parents | a921cc2306bc |
children | 7965adc14569 |
comparison
equal
deleted
inserted
replaced
29:20d4cf433704 | 30:53de06c2f97d |
---|---|
108 toot = ctx.silos[0].client.toots[0] | 108 toot = ctx.silos[0].client.toots[0] |
109 assert toot == ("This is a link: http://example.org/blah", None, 'public') | 109 assert toot == ("This is a link: http://example.org/blah", None, 'public') |
110 | 110 |
111 feed = cli.createTempFeed(feedutil.makeFeed( | 111 feed = cli.createTempFeed(feedutil.makeFeed( |
112 """<p class="e-content">This is another link: <a href="http://example.org/blah">http://example.org/blah</a></p> | 112 """<p class="e-content">This is another link: <a href="http://example.org/blah">http://example.org/blah</a></p> |
113 <a class="u-uri" href="/01234.html">permalink</a>""")) # NOQA | 113 <a class="u-url" href="/01234.html">permalink</a>""")) # NOQA |
114 cli.setFeedConfig('feed', feed) | 114 cli.setFeedConfig('feed', feed) |
115 ctx, _ = cli.run('process') | 115 ctx, _ = cli.run('process') |
116 toot = ctx.silos[0].client.toots[0] | 116 toot = ctx.silos[0].client.toots[0] |
117 assert toot == ("This is another link: http://example.org/blah", None, 'public') # NOQA | 117 assert toot == ("This is another link: http://example.org/blah", None, 'public') # NOQA |
118 | 118 |
119 feed = cli.createTempFeed(feedutil.makeFeed( | 119 feed = cli.createTempFeed(feedutil.makeFeed( |
120 """<p class="e-content">This is yet <a href="http://example.org/blah">another link</a></p> | 120 """<p class="e-content">This is yet <a href="http://example.org/blah">another link</a></p> |
121 <a class="u-uri" href="/01234.html">permalink</a>""")) # NOQA | 121 <a class="u-url" href="/01234.html">permalink</a>""")) # NOQA |
122 cli.setFeedConfig('feed', feed) | 122 cli.setFeedConfig('feed', feed) |
123 ctx, _ = cli.run('process') | 123 ctx, _ = cli.run('process') |
124 toot = ctx.silos[0].client.toots[0] | 124 toot = ctx.silos[0].client.toots[0] |
125 assert toot == ("This is yet another link http://example.org/blah", None, 'public') # NOQA | 125 assert toot == ("This is yet another link http://example.org/blah", None, 'public') # NOQA |
126 | 126 |