openzim / python-scraperlib

Collection of Python code to re-use across Python-based scrapers
GNU General Public License v3.0
19 stars 16 forks source link

Fixed StaticArticle usage with content= #40

Closed rgaudin closed 4 years ago

rgaudin commented 4 years ago

When using StaticArticle without a filename (content=) get_data() should return the passed content bytes. This behavior is toggled based on the result of get_filename(). Casting to str the filename argument resulted in get_filename() to return "None" fooling it into thinking it's a filename based StaticArticle

codecov[bot] commented 4 years ago

Codecov Report

Merging #40 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #40   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           19        19           
  Lines          777       777           
=========================================
  Hits           777       777           
Impacted Files Coverage Δ
src/zimscraperlib/zim/creator.py 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7aa4766...3202686. Read the comment docs.