spidermon icon indicating copy to clipboard operation
spidermon copied to clipboard

Allow Arbitrary kwargs when sending Slack messages using the slack Client postMessage method

Open ankitjavalkar opened this issue 3 years ago • 3 comments

Resolves #293

ankitjavalkar avatar Apr 06 '22 13:04 ankitjavalkar

Codecov Report

Merging #346 (5ffc446) into master (6af58c2) will increase coverage by 0.00%. The diff coverage is n/a.

:exclamation: Current head 5ffc446 differs from pull request most recent head f303fb6. Consider uploading reports for the commit f303fb6 to get more accurate results

@@           Coverage Diff           @@
##           master     #346   +/-   ##
=======================================
  Coverage   74.03%   74.03%           
=======================================
  Files          72       70    -2     
  Lines        3096     3031   -65     
  Branches      483      465   -18     
=======================================
- Hits         2292     2244   -48     
+ Misses        737      724   -13     
+ Partials       67       63    -4     
Impacted Files Coverage Δ
spidermon/contrib/actions/slack/__init__.py 56.63% <ø> (ø)
spidermon/core/factories.py 78.78% <0.00%> (-2.47%) :arrow_down:
spidermon/contrib/actions/email/ses.py 0.00% <0.00%> (ø)
spidermon/contrib/actions/reports/s3.py 0.00% <0.00%> (ø)
spidermon/contrib/actions/reports/files.py 0.00% <0.00%> (ø)
spidermon/contrib/actions/sentry/__init__.py 0.00% <0.00%> (ø)
spidermon/contrib/actions/reports/__init__.py 0.00% <0.00%> (ø)
spidermon/contrib/actions/telegram/__init__.py 88.67% <0.00%> (ø)
spidermon/contrib/actions/discord/notifiers.py
... and 5 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 6af58c2...f303fb6. Read the comment docs.

codecov[bot] avatar Apr 06 '22 13:04 codecov[bot]

I think this is not enough. You are allowing arbitrary keyword arguments in a (private) method, but all methods that call it (including the public ones that are the ones users are expected to actually call) still do not allow those parameters.

Gallaecio avatar Apr 21 '22 12:04 Gallaecio

@Gallaecio I have now added the **kwargs to function calls and public methods as well. I have also added tests using MagicMock.

ankitjavalkar avatar Jul 26 '22 12:07 ankitjavalkar

Closed in favor of https://github.com/scrapinghub/spidermon/pull/397/files

VMRuiz avatar Jul 04 '23 08:07 VMRuiz