discord-modmail / modmail

A Modmail bot for Discord. Allowing safe moderator conversations with server members one server at a time.
https://discord-modmail.readthedocs.io/
MIT License
15 stars 8 forks source link

tests: mock aiohttp responses and fix windows #125

Closed onerandomusername closed 2 years ago

onerandomusername commented 2 years ago

fix: use WindowsSelectorEventLoopPolicy on windows

in addition, will use aioresponses for our test suite so no aiohttp sessions actually make real requests.

codecov[bot] commented 2 years ago

Codecov Report

Merging #125 (8fea42f) into main (4b07917) will decrease coverage by 0.22%. The diff coverage is 50.00%.

:exclamation: Current head 8fea42f differs from pull request most recent head 25192c5. Consider uploading reports for the commit 25192c5 to get more accurate results Impacted file tree graph

@@            Coverage Diff             @@
##             main     #125      +/-   ##
==========================================
- Coverage   70.90%   70.68%   -0.23%     
==========================================
  Files          33       33              
  Lines        1619     1634      +15     
  Branches      199      202       +3     
==========================================
+ Hits         1148     1155       +7     
- Misses        439      445       +6     
- Partials       32       34       +2     
Impacted Files Coverage Δ
modmail/bot.py 37.87% <38.88%> (-0.97%) :arrow_down:
modmail/__init__.py 100.00% <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 6ab7918...25192c5. Read the comment docs.

onerandomusername commented 2 years ago

Fixing conflicts and then merging.

coveralls commented 2 years ago

Pull Request Test Coverage Report for Build 1509624103


Changes Missing Coverage Covered Lines Changed/Added Lines %
tests/test_fixtures.py 18 19 94.74%
modmail/bot.py 9 18 50.0%
<!-- Total: 47 57 82.46% -->
Totals Coverage Status
Change from base Build 1509599375: 0.2%
Covered Lines: 1672
Relevant Lines: 2123

💛 - Coveralls