Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 888671 - dev-python/responses-0.22.0-r1 fails tests: AttributeError: 'ContentServer' object has no attribute 'expect_request'
Summary: dev-python/responses-0.22.0-r1 fails tests: AttributeError: 'ContentServer' o...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-27 23:14 UTC by Jonathan Lovelace
Modified: 2022-12-27 23:27 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
dev-python:responses-0.22.0-r1:20221227-123538.log (dev-python:responses-0.22.0-r1:20221227-123538.log,54.60 KB, text/plain)
2022-12-27 23:14 UTC, Jonathan Lovelace
Details
emerge-info.txt (emerge-info.txt,8.54 KB, text/plain)
2022-12-27 23:15 UTC, Jonathan Lovelace
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Lovelace 2022-12-27 23:14:32 UTC
Created attachment 845269 [details]
dev-python:responses-0.22.0-r1:20221227-123538.log

=dev-python/responses-0.22.0-r1 fails its test phase, specifically one test in responses/tests/test_recorder.py and several tests in responses/tests/test_responses.py, all with the error "AttributeError: 'ContentServer' object has no attribute 'expect_request'":

=========================================================== short test summary info ===========================================================
SKIPPED [2] ../../../../../../../usr/lib/python3.10/site-packages/_pytest/python.py:185: async def function and no async plugin installed (see warnings)
FAILED responses/tests/test_recorder.py::TestRecord::test_recorder - AttributeError: 'ContentServer' object has no attribute 'expect_request'
FAILED responses/tests/test_responses.py::test_passthrough_flag - AttributeError: 'ContentServer' object has no attribute 'expect_request'
FAILED responses/tests/test_responses.py::test_passthrough_kwarg - AttributeError: 'ContentServer' object has no attribute 'expect_request'
FAILED responses/tests/test_responses.py::test_passthrough_response - AttributeError: 'ContentServer' object has no attribute 'expect_request'
FAILED responses/tests/test_responses.py::test_passthrough_response_stream - AttributeError: 'ContentServer' object has no attribute 'expect...
FAILED responses/tests/test_responses.py::test_passthru_prefixes - AttributeError: 'ContentServer' object has no attribute 'expect_request'
FAILED responses/tests/test_responses.py::test_passthru - AttributeError: 'ContentServer' object has no attribute 'expect_request'
FAILED responses/tests/test_responses.py::test_passthru_regex - AttributeError: 'ContentServer' object has no attribute 'expect_request'
FAILED responses/tests/test_responses.py::test_passthru_does_not_persist_across_tests - AttributeError: 'ContentServer' object has no attrib...
FAILED responses/tests/test_responses.py::TestMultipleWrappers::test_mock_not_leaked - AttributeError: 'ContentServer' object has no attribu...
=========================================== 10 failed, 183 passed, 2 skipped, 31 warnings in 56.29s ===========================================

Version 0.21.0 passed its tests when it was built back in July.
Comment 1 Jonathan Lovelace 2022-12-27 23:15:00 UTC
Created attachment 845271 [details]
emerge-info.txt
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-27 23:21:25 UTC
>plugins: asyncio-0.20.3, betamax-0.8.1, flaky-3.7.0, timeout-2.1.0, xprocess-0.20.0, aiohttp-1.0.4, mock-3.10.0, expect-1.1.0, pkgcore-0.12.17, shutil-1.7.0, hypothesis-6.59.0, requests-mock-1.10.0, virtualenv-1.7.0, pyfakefs-5.0.0, httpserver-1.0.6, trio-0.8.0, httpbin-1.0.2, django-4.5.2, freezegun-0.4.2, subtests-0.9.0, anyio-3.6.1, xdist-3.0.2, services-2.2.1, forked-1.4.0, localserver-0.7.0, codeblocks-0.16.1, rerunfailures-10.3

I suspect it's one of these plugins upsetting matters. It still passes for me if I install dev-python/pytest-asyncio (which it looks like we're missing as a test dep).
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-27 23:23:07 UTC
Ah, it's dev-python/pytest-localserver! I don't think things work if httpserver and localserver are both pulled in.
Comment 4 Larry the Git Cow gentoo-dev 2022-12-27 23:26:25 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c0ffaf655d75bd7a68e7642cf83eae9fb0f46ad

commit 8c0ffaf655d75bd7a68e7642cf83eae9fb0f46ad
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-12-27 23:26:02 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-12-27 23:26:02 +0000

    dev-python/responses: fix tests
    
    Bug: https://bugs.gentoo.org/888671
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-python/responses/responses-0.22.0-r1.ebuild | 4 ++++
 1 file changed, 4 insertions(+)