New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export headers in GithubException #1887
Export headers in GithubException #1887
Conversation
Since the headers that led to an exception are also useful, firstly pass them into the constructor, and then export them in a property. Test one specific use case to make sure of coverage. Fixes PyGithub#1814
Hi @s-t-e-v-e-n-k, just came across this as PyGithub 1.55 got released yesterday and our calls to |
Good point, I'll edit the release notes |
We need to update how we mock GithubException since 1.55 it now accepts HTTP headers in form of a positional argument as well: PyGithub/PyGithub#1887 Kudos @lbarcziova Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
We need to update how we mock GithubException since 1.55 it now accepts HTTP headers in form of a positional argument as well: PyGithub/PyGithub#1887 This is implemented with inspect.signature so our tests work for both versions of pygithub <1.55 and >=1.55 because 1.55 is not in stable Fedora yet. Kudos @lbarcziova Signed-off-by: Tomas Tomecek <ttomecek@redhat.com> Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
tests: GithubException now accepts also headers We need to update how we mock GithubException since 1.55 it now accepts HTTP headers in form of a positional argument as well: PyGithub/PyGithub#1887 Kudos @lbarcziova Reviewed-by: None <None> Reviewed-by: Laura Barcziová <None>
Since the headers that led to an exception are also useful, firstly pass
them into the constructor, and then export them in a property. Test one
specific use case to make sure of coverage.
Fixes #1814