Azure / azure-functions-python-library

Azure Functions Python SDK
MIT License
150 stars 63 forks source link

Added support for http.HTTPStatus in HTTPResponse #161

Closed metamoof closed 1 year ago

metamoof commented 1 year ago

It should be possible to pass values from the standard library http.HTTPStatus enum to HTTPResponse

YunchuWang commented 1 year ago

LGTM, can you fix the test failures and add unit test for it? @metamoof

metamoof commented 1 year ago

@microsoft-github-policy-service agree

codecov[bot] commented 1 year ago

Codecov Report

Merging #161 (a828860) into dev (d91e095) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##              dev     #161   +/-   ##
=======================================
  Coverage   90.25%   90.26%           
=======================================
  Files          51       51           
  Lines        2996     2999    +3     
  Branches      796      797    +1     
=======================================
+ Hits         2704     2707    +3     
  Misses        215      215           
  Partials       77       77           
Flag Coverage Δ
unittests 90.23% <100.00%> (+<0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
azure/functions/_http.py 93.22% <100.00%> (+0.17%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

vrdmr commented 1 year ago

Thanks a lot, @metamoof for the PR. We'll test and get this in asap. This is definitely a useful addition.