Bug ID | 1228868 |
---|---|
Summary | Incorrect count of requests in `call_count` |
Classification | openSUSE |
Product | openSUSE Distribution |
Version | Leap 15.6 |
Hardware | Other |
OS | Other |
Status | NEW |
Severity | Normal |
Priority | P5 - None |
Component | Python |
Assignee | python-maintainers@suse.com |
Reporter | ahasenkopf@suse.com |
QA Contact | qa-bugs@suse.de |
Target Milestone | --- |
Found By | --- |
Blocker | --- |
Created attachment 876481 [details]
Small script to reproduce the bug
The `call_count` attribute of mocks differs from upstream packages.
When using `urllib3.Retry` and using `responses` to mock a request, the
resulting call count is wrong.
With the attached example script, all Python versions and upstream packages
from PyPI result in a call count of 7. On Leap 15.5 and Leap 15.6 the value is
11.
Installed RPMs (excerpt):
* python3-base-3.6.15-150300.10.65.1.x86_64
* libpython3_6m1_0-3.6.15-150300.10.65.1.x86_64
* python3-3.6.15-150300.10.65.2.x86_64
* python3-urllib3-1.25.10-150300.4.9.1.noarch
* python3-requests-2.25.1-150300.3.6.1.noarch
* python3-responses-0.21.0-150300.3.3.1.noarch
Steps to reproduce:
```
docker run -it --rm registry.opensuse.org/opensuse/leap:15.6
zypper in python3-responses
python3 <path-to-example-script>
```