wagtail / wagtail-live

High speed publishing from messaging apps to a Wagtail live blog. A GSoC 2021 project.
https://wagtail.github.io/wagtail-live/
BSD 3-Clause "New" or "Revised" License
37 stars 6 forks source link

Add tests #104

Closed Tijani-Dia closed 3 years ago

Tijani-Dia commented 3 years ago

I made some little refactoring and added tests to reach 100%.

The run_publisher.py file is omitted in the measurements. It's tricky to test and it won' be used in production.

codecov-commenter commented 3 years ago

Codecov Report

Merging #104 (4cbc4d7) into main (6919766) will increase coverage by 3.27%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##             main      #104      +/-   ##
===========================================
+ Coverage   96.72%   100.00%   +3.27%     
===========================================
  Files          41        40       -1     
  Lines        1100      1061      -39     
  Branches      104        96       -8     
===========================================
- Hits         1064      1061       -3     
+ Misses         30         0      -30     
+ Partials        6         0       -6     
Impacted Files Coverage Δ
src/wagtail_live/exceptions.py 100.00% <ø> (ø)
src/wagtail_live/models.py 100.00% <ø> (ø)
src/wagtail_live/publishers/polling.py 100.00% <ø> (ø)
src/wagtail_live/publishers/piesocket/utils.py 100.00% <100.00%> (ø)
src/wagtail_live/receivers/telegram/utils.py 100.00% <100.00%> (ø)
src/wagtail_live/utils.py 100.00% <100.00%> (+8.33%) :arrow_up:
.../wagtail_live/management/commands/run_publisher.py
src/wagtail_live/receivers/slack/receivers.py 100.00% <0.00%> (+0.90%) :arrow_up:
src/wagtail_live/receivers/base.py 100.00% <0.00%> (+1.52%) :arrow_up:
src/wagtail_live/version.py 100.00% <0.00%> (+16.66%) :arrow_up:
... and 2 more

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 6919766...4cbc4d7. Read the comment docs.