From 67136a3020b2a1b77c60be59228f85364506ba5b Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Mon, 9 Nov 2020 12:14:47 +0100 Subject: [PATCH] update test URL --- tests/conftest.py | 3 ++- tests/test_header.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 33cc26c..d720b84 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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() diff --git a/tests/test_header.py b/tests/test_header.py index 556b236..52b628d 100644 --- a/tests/test_header.py +++ b/tests/test_header.py @@ -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'