Mercurial > silorider
diff tests/conftest.py @ 59:b404445082f8
Prevent unit tests from downloading fake posts
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 28 Oct 2023 11:54:24 -0700 |
parents | d3c4c5082bbc |
children |
line wrap: on
line diff
--- a/tests/conftest.py Sat Oct 28 11:52:25 2023 -0700 +++ b/tests/conftest.py Sat Oct 28 11:54:24 2023 -0700 @@ -5,7 +5,9 @@ import logging import tempfile import pytest +import unittest.mock import silorider.main +import silorider.format logger = logging.getLogger(__name__) @@ -18,6 +20,8 @@ re_feed_test_sep = re.compile(r'^---$') +silorider.format._disable_get_card_info = True + class FeedFile(pytest.File): def collect(self): @@ -156,7 +160,7 @@ class FeedUtil: def makeFeed(self, *entries): - feed = '<html><body>\n' + feed = '<html><body class="h-feed">\n' for e in entries: feed += '<article class="h-entry">\n' feed += e