added test for feed generation

This commit is contained in:
Bastian Venthur
2021-02-13 13:38:18 +01:00
parent d3db03dc4b
commit 8f8a89f1eb

View File

@@ -0,0 +1,18 @@
from tempfile import TemporaryDirectory
import os
import pytest
from blag import blag
@pytest.fixture
def outdir():
with TemporaryDirectory() as dir:
yield dir
def test_generate_feed(outdir):
articles = []
blag.generate_feed(articles, outdir, ' ', ' ', ' ', ' ')
assert os.path.exists(f'{outdir}/atom.xml')