add fixture for an article

This commit is contained in:
Andreas Zweili 2020-10-12 15:16:18 +02:00
parent 49d0407397
commit e214d7ece5
1 changed files with 13 additions and 0 deletions

13
tests/conftest.py Normal file
View File

@ -0,0 +1,13 @@
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'
article = Article(url)
article.download()
article.parse()
return article
return _create_article