comparison tests/test_commands_populate.py @ 61:91dea4fe31ec

Fix another unit test to be more explicit about where the feed is.
author Ludovic Chabant <ludovic@chabant.com>
date Sat, 28 Oct 2023 11:57:36 -0700
parents 1db1890edcf5
children
comparison
equal deleted inserted replaced
60:b7da3d97ea99 61:91dea4fe31ec
1 1
2 feed1 = """ 2 feed1 = """
3 <html><body> 3 <html><body class="h-feed">
4 <article class="h-entry"> 4 <article class="h-entry">
5 <h1 class="p-name">A new article</h1> 5 <h1 class="p-name">A new article</h1>
6 <div class="e-content"> 6 <div class="e-content">
7 <p>This is the text of the article.</p> 7 <p>This is the text of the article.</p>
8 <p>It has 2 paragraphs.</p> 8 <p>It has 2 paragraphs.</p>
19 ctx, _ = cli.run('populate', '-s', 'test') 19 ctx, _ = cli.run('populate', '-s', 'test')
20 assert ctx.cache.wasPosted('test', 'https://example.org/a-new-article') 20 assert ctx.cache.wasPosted('test', 'https://example.org/a-new-article')
21 21
22 22
23 feed2 = """ 23 feed2 = """
24 <html><body> 24 <html><body class="h-feed">
25 <article class="h-entry"> 25 <article class="h-entry">
26 <h1 class="p-name">First article</h1> 26 <h1 class="p-name">First article</h1>
27 <div><time class="dt-published" datetime="2018-01-07T09:30:00-00:00"></time></div> 27 <div><time class="dt-published" datetime="2018-01-07T09:30:00-00:00"></time></div>
28 <a class="u-url" href="https://example.org/first-article">permalink</a> 28 <a class="u-url" href="https://example.org/first-article">permalink</a>
29 </article> 29 </article>