update test URL
This commit is contained in:
parent
dc465a443e
commit
67136a3020
|
@ -2,10 +2,11 @@ import pytest
|
||||||
|
|
||||||
from newspaper import Article
|
from newspaper import Article
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def create_article():
|
def create_article():
|
||||||
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 = Article(url)
|
||||||
article.download()
|
article.download()
|
||||||
article.parse()
|
article.parse()
|
||||||
|
|
|
@ -13,4 +13,4 @@ def test_dict_to_string(create_article):
|
||||||
article.keywords = ['foo', 'bar', 'baz']
|
article.keywords = ['foo', 'bar', 'baz']
|
||||||
string_header = header.Header(article, [])
|
string_header = header.Header(article, [])
|
||||||
string = string_header.build_header()
|
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'
|
||||||
|
|
Loading…
Reference in New Issue