Skip to content

Commit

Permalink
No images in article content
Browse files Browse the repository at this point in the history
  • Loading branch information
bohdanbobrowski committed Nov 13, 2024
1 parent 1539c61 commit 88f48c5
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/integration/blog2epub/test_blog2epub_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,21 @@ def test_starybezpiek_downloads_one_article(self, mock_configuration):
assert ebook.file_name == "starybezpiek_blogspot_com_2015.09.23-2015.12.15.epub"
assert os.path.isfile("./starybezpiek_blogspot_com_2015.09.23-2015.12.15.epub")
assert os.path.isfile(ebook.cover_image_path)

def test_bohdan_bobrowski_com_pl_has_images(self, mock_configuration):
# given
given_blog2epub = Blog2Epub(
url="bohdan.bobrowski.com.pl",
interface=EmptyInterface(),
configuration=mock_configuration,
)
# when
given_blog2epub.download()
ebook = Book(
book_data=given_blog2epub.crawler.get_book_data(),
interface=EmptyInterface(),
configuration=mock_configuration,
)
# then
assert ebook.book_data.articles >= 2
assert ebook.book_data.articles[0].content.find('img src="') > -1

0 comments on commit 88f48c5

Please sign in to comment.