intelmq icon indicating copy to clipboard operation
intelmq copied to clipboard

FIX/ENH: HttpMixin refactored and various fixes

Open waldbauer-certat opened this issue 2 years ago • 1 comments

General Removed 'requests' MissingDependencyError, because requests is a core lib from intelmq Removed HTTP variables from Bot class in favor of HttpMixin Removed trying to import requests in pipeline, its a core lib from intelmq Added additional configuration variables to HttpMixin ( from Bot class )

Bots GitHub API is now using HttpMixin MS Azure Collector is now using HttpMixin DO-Portal Expert is now using HttpMixin GeoHash using MissingDependencyError instead of ValueError (consistency) HttpContentExpert is now using HttpMixin HttpStatusExpert is now using HttpMixin NationalCERTContactCertATExpert is now using HttpMixin RDAPExpert is now using HttpMixin RIPEExpert is now using HttpMixin SplunkSavedSearchExpert is now using HttpMixin TuencyExpert is now using HttpMixin RestAPIOutput is now using HttpMixin

Bot tests GitHub API Collector is now using requests_mock instead of MagicMock (consistency) RestAPI Output is now using correct headers

Fixes #2150 Fixes #2137

waldbauer-certat avatar Feb 04 '22 12:02 waldbauer-certat

Codecov Report

Merging #2151 (f3ae806) into develop (8d1c926) will increase coverage by 0.06%. The diff coverage is 89.02%.

@@             Coverage Diff             @@
##           develop    #2151      +/-   ##
===========================================
+ Coverage    76.34%   76.40%   +0.06%     
===========================================
  Files          441      441              
  Lines        23652    23560      -92     
  Branches      3739     3729      -10     
===========================================
- Hits         18058    18002      -56     
+ Misses        4857     4836      -21     
+ Partials       737      722      -15     
Impacted Files Coverage Δ
intelmq/lib/bot.py 63.95% <ø> (-0.18%) :arrow_down:
intelmq/bots/collectors/mail/collector_mail_url.py 76.19% <50.00%> (+0.38%) :arrow_up:
intelmq/bots/experts/geohash/expert.py 76.00% <50.00%> (+1.00%) :arrow_up:
intelmq/bots/collectors/shodan/collector_stream.py 40.47% <66.66%> (+1.45%) :arrow_up:
intelmq/bots/experts/do_portal/expert.py 35.48% <66.66%> (+6.91%) :arrow_up:
...ots/experts/national_cert_contact_certat/expert.py 40.62% <66.66%> (+3.78%) :arrow_up:
intelmq/bots/outputs/elasticsearch/output.py 76.74% <66.66%> (-1.31%) :arrow_down:
intelmq/bots/experts/splunk_saved_search/expert.py 19.38% <75.00%> (-0.62%) :arrow_down:
intelmq/bots/outputs/restapi/output.py 75.60% <80.00%> (+4.77%) :arrow_up:
...ots/collectors/github_api/_collector_github_api.py 90.00% <100.00%> (+10.58%) :arrow_up:
... and 14 more

codecov-commenter avatar Feb 07 '22 09:02 codecov-commenter