python311Packages.boto: fix build

This commit is contained in:
Cédric Finance 2023-05-13 10:50:03 +02:00
parent 1f68716877
commit 9efcaa10c5
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,21 @@
From: Jochen Sprickerhof <jspricke@debian.org>
Date: Thu, 15 Dec 2022 07:44:54 +0100
Subject: Don't mock list subclass
---
tests/unit/ec2/test_volume.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/unit/ec2/test_volume.py b/tests/unit/ec2/test_volume.py
index 81d7f55..d4d8e4f 100644
--- a/tests/unit/ec2/test_volume.py
+++ b/tests/unit/ec2/test_volume.py
@@ -55,7 +55,7 @@ class VolumeTests(unittest.TestCase):
@mock.patch("boto.resultset.ResultSet")
def test_startElement_with_name_tagSet_calls_ResultSet(self, ResultSet, startElement):
startElement.return_value = None
- result_set = mock.Mock(ResultSet([("item", Tag)]))
+ result_set = ResultSet([("item", Tag)])
volume = Volume()
volume.tags = result_set
retval = volume.startElement("tagSet", None, None)

View File

@ -22,6 +22,9 @@ buildPythonPackage rec {
# fixes hmac tests
# https://sources.debian.org/src/python-boto/2.49.0-4/debian/patches/bug-953970_python3.8-compat.patch/
./bug-953970_python3.8-compat.patch
# fixes test_startElement_with_name_tagSet_calls_ResultSet
# https://sources.debian.org/src/python-boto/2.49.0-4.1/debian/patches/0005-Don-t-mock-list-subclass.patch/
./0005-Don-t-mock-list-subclass.patch
];
# boto is deprecated by upstream as of 2021-05-27 (https://github.com/boto/boto/commit/4980ac58764c3d401cb0b9552101f9c61c18f445)