pytest-httpserver icon indicating copy to clipboard operation
pytest-httpserver copied to clipboard

Add hooks functionality

Open csernazs opened this issue 1 year ago • 1 comments

This will allow users to define one callable object (a hook) for each request handler, which will be called right before returning the response.

The hook has the possibility to return a new response object which will be used instead of the original one. The callback (hook) will receive the request and response objects.

csernazs avatar Mar 24 '24 20:03 csernazs

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.90%. Comparing base (6a5d6b8) to head (5720725). Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #295      +/-   ##
==========================================
+ Coverage   95.63%   95.90%   +0.26%     
==========================================
  Files           4        5       +1     
  Lines         619      659      +40     
==========================================
+ Hits          592      632      +40     
  Misses         27       27              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 24 '24 20:03 codecov[bot]