mirror of
https://github.com/venthur/blag.git
synced 2025-11-25 20:52:43 +00:00
added test for feed generation
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user