Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ Other / Development
(#1994)
[Tomaz Muraus - @Kami]

- Add a workaround so tests work with pytest >= 8.2. Also use latest version of
pytest for running tests.
(#2033)
[Steve Kowalik - @s-t-e-v-e-n-k]

Changes in Apache Libcloud 3.8.0
--------------------------------

Expand Down
8 changes: 6 additions & 2 deletions libcloud/test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def read(self, chunk_size=None):
return StringIO.read(self)


class MockHttp(LibcloudConnection):
class MockHttp(LibcloudConnection, unittest.TestCase):
"""
A mock HTTP client/server suitable for testing purposes. This replaces
`HTTPConnection` by implementing its API and returning a mock response.
Expand All @@ -108,7 +108,11 @@ def __init__(self, *args, **kwargs):
# within a response
if isinstance(self, unittest.TestCase):
unittest.TestCase.__init__(self, "__init__")
super().__init__(*args, **kwargs)
# When this class is collected, it is instantiated with no arguments,
# which breaks any superclasses that expect arguments, so only
# do so if we were passed any keyword arguments.
if kwargs:
super().__init__(*args, **kwargs)

def _get_request(self, method, url, body=None, headers=None):
# Find a method we can use for this request
Expand Down
8 changes: 4 additions & 4 deletions requirements-tests.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
coverage[toml]==7.2.7; python_version >= '3.8'
requests>=2.31.0
requests_mock==1.11.0
pytest==8.1.1
pytest-xdist==3.5.0
pytest-timeout==2.2.0
pytest-benchmark[histogram]==4.0.0
pytest==8.3.5
pytest-xdist==3.6.1
pytest-timeout==2.3.1
pytest-benchmark[histogram]==5.1.0
cryptography==44.0.2

# NOTE: Only needed by nttcis loadbalancer driver
Expand Down
Loading