update test URL

This commit is contained in:
Andreas Zweili 2020-11-09 12:14:47 +01:00
parent dc465a443e
commit 67136a3020
2 changed files with 3 additions and 2 deletions

View File

@ -2,10 +2,11 @@ import pytest
from newspaper import Article
@pytest.fixture
def create_article():
def _create_article():
url = 'https://www.20min.ch/story/corona-zahlen-auf-einen-blick-803083076953'
url = 'https://www.republik.ch/2020/11/09/kann-die-schweiz-auf-rendite-aus-kriegs-material-verzichten'
article = Article(url)
article.download()
article.parse()

View File

@ -13,4 +13,4 @@ def test_dict_to_string(create_article):
article.keywords = ['foo', 'bar', 'baz']
string_header = header.Header(article, [])
string = string_header.build_header()
assert string == '- meta:\n - topics: [[foo]] [[bar]] [[baz]]\n - date: [[2020-10-09]]\n - authors: [[Daniel Waldmeier]] [[Kei Zuefall]]\n - url: https://www.20min.ch/story/corona-zahlen-auf-einen-blick-803083076953\n'
assert string == '- meta:\n - topics: [[foo]] [[bar]] [[baz]]\n - date: [[2020-11-09]]\n - url: https://www.republik.ch/2020/11/09/kann-die-schweiz-auf-rendite-aus-kriegs-material-verzichten\n'