From 219a7301907b9856f18d12bcd54db76bd5f205e7 Mon Sep 17 00:00:00 2001 From: Simon Conseil Date: Sun, 7 Jan 2018 00:38:35 +0100 Subject: [PATCH] Test the feeds plugin --- .travis.yml | 2 +- tests/test_cli.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5746399..d5612b8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,7 @@ addons: install: - pip install -U pip setuptools wheel - pip install -q $PILLOW - - pip install pytest pytest-cov codecov + - pip install pytest pytest-cov codecov feedgenerator - pip install . before_script: diff --git a/tests/test_cli.py b/tests/test_cli.py index 2fa1b32..d10a5a6 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -67,6 +67,8 @@ copyright_text_font = "foobar" watermark = "watermark.png" watermark_position = "scale" watermark_opacity = 0.3 +rss_feed = {'feed_url': 'http://example.org/feed.rss', 'nb_items': 10} +atom_feed = {'feed_url': 'http://example.org/feed.atom', 'nb_items': 10} """ with io.open(config_file, 'w') as f: @@ -77,6 +79,8 @@ watermark_opacity = 0.3 assert result.exit_code == 0 assert os.path.isfile(join(tmpdir, 'build', 'thumbnails', 'exo20101028-b-full.jpg')) + assert os.path.isfile(join(tmpdir, 'build', 'feed.atom')) + assert os.path.isfile(join(tmpdir, 'build', 'feed.rss')) finally: os.chdir(cwd) # Reset logger