]> git.pld-linux.org Git - packages/python-boto.git/blob - python-boto-mock.patch
- added Fedora patches + fixes for collections.abc moves in python 3.10; release 6
[packages/python-boto.git] / python-boto-mock.patch
1 --- boto-2.49.0/tests/integration/s3/test_bucket.py.orig        2018-07-11 19:35:36.000000000 +0200
2 +++ boto-2.49.0/tests/integration/s3/test_bucket.py     2021-02-14 20:03:03.481843289 +0100
3 @@ -26,7 +26,10 @@
4  Some unit tests for the S3 Bucket
5  """
6  
7 -from mock import patch, Mock
8 +try:
9 +    from mock import patch, Mock
10 +except ImportError:
11 +    from unittest.mock import patch, Mock
12  import unittest
13  import time
14  
15 --- boto-2.49.0/tests/integration/s3/test_https_cert_validation.py.orig 2018-07-11 19:35:36.000000000 +0200
16 +++ boto-2.49.0/tests/integration/s3/test_https_cert_validation.py      2021-02-14 20:03:18.711760781 +0100
17 @@ -38,7 +38,7 @@ Note that this test assumes two external
18  import os
19  import ssl
20  import unittest
21 -import mock
22 +from tests.compat import mock
23  
24  from nose.plugins.attrib import attr
25  
26 --- boto-2.49.0/tests/integration/s3/test_multipart.py.orig     2018-07-11 19:35:36.000000000 +0200
27 +++ boto-2.49.0/tests/integration/s3/test_multipart.py  2021-02-14 20:03:12.025130339 +0100
28 @@ -37,7 +37,7 @@ import unittest
29  import time
30  from boto.compat import StringIO
31  
32 -import mock
33 +from tests.compat import mock
34  
35  import boto
36  from boto.s3.connection import S3Connection
37 --- boto-2.49.0/tests/unit/auth/test_stsanon.py.orig    2018-07-11 19:35:36.000000000 +0200
38 +++ boto-2.49.0/tests/unit/auth/test_stsanon.py 2021-02-14 19:57:30.110315984 +0100
39 @@ -20,7 +20,10 @@
40  # IN THE SOFTWARE.
41  #
42  import copy
43 -from mock import Mock
44 +try:
45 +    from mock import Mock
46 +except ImportError:
47 +    from unittest.mock import Mock
48  from tests.unit import unittest
49  
50  from boto.auth import STSAnonHandler
51 --- boto-2.49.0/tests/unit/cloudformation/test_connection.py.orig       2018-07-11 19:35:36.000000000 +0200
52 +++ boto-2.49.0/tests/unit/cloudformation/test_connection.py    2021-02-14 20:01:15.389095544 +0100
53 @@ -1,7 +1,10 @@
54  #!/usr/bin/env python
55  import unittest
56  from datetime import datetime
57 -from mock import Mock
58 +try:
59 +    from mock import Mock
60 +except ImportError:
61 +    from unittest.mock import Mock
62  
63  from tests.unit import AWSMockServiceTestCase
64  from boto.cloudformation.connection import CloudFormationConnection
65 --- boto-2.49.0/tests/unit/cloudsearch2/test_document.py.orig   2018-07-11 19:35:36.000000000 +0200
66 +++ boto-2.49.0/tests/unit/cloudsearch2/test_document.py        2021-02-14 20:00:05.506140799 +0100
67 @@ -4,7 +4,10 @@ from boto.cloudsearch2.layer1 import Clo
68  
69  from tests.unit import unittest, AWSMockServiceTestCase
70  from httpretty import HTTPretty
71 -from mock import MagicMock
72 +try:
73 +    from mock import MagicMock
74 +except ImportError:
75 +    from unittest.mock import MagicMock
76  
77  import json
78  
79 --- boto-2.49.0/tests/unit/cloudsearchdomain/test_cloudsearchdomain.py.orig     2018-07-11 19:35:36.000000000 +0200
80 +++ boto-2.49.0/tests/unit/cloudsearchdomain/test_cloudsearchdomain.py  2021-02-14 19:59:29.589668709 +0100
81 @@ -1,6 +1,6 @@
82  #!/usr/bin env python
83  import json
84 -import mock
85 +from tests.compat import mock
86  from tests.unit import AWSMockServiceTestCase
87  from boto.cloudsearch2.domain import Domain
88  from boto.cloudsearch2.layer1 import CloudSearchConnection
89 --- boto-2.49.0/tests/unit/cloudsearch/test_document.py.orig    2018-07-11 19:35:36.000000000 +0200
90 +++ boto-2.49.0/tests/unit/cloudsearch/test_document.py 2021-02-14 20:00:44.145931469 +0100
91 @@ -2,7 +2,10 @@
92  
93  from tests.unit import unittest
94  from httpretty import HTTPretty
95 -from mock import MagicMock
96 +try:
97 +    from mock import MagicMock
98 +except ImportError:
99 +    from unittest.mock import MagicMock
100  
101  import json
102  
103 --- boto-2.49.0/tests/unit/dynamodb/test_layer2.py.orig 2018-07-11 19:35:36.000000000 +0200
104 +++ boto-2.49.0/tests/unit/dynamodb/test_layer2.py      2021-02-14 20:00:25.679364845 +0100
105 @@ -22,7 +22,10 @@
106  #
107  
108  from tests.unit import unittest
109 -from mock import Mock
110 +try:
111 +    from mock import Mock
112 +except ImportError:
113 +    from unittest.mock import Mock
114  
115  from boto.dynamodb.layer2 import Layer2
116  from boto.dynamodb.table import Table, Schema
117 --- boto-2.49.0/tests/unit/ec2containerservice/test_connection.py.orig  2018-07-11 19:35:36.000000000 +0200
118 +++ boto-2.49.0/tests/unit/ec2containerservice/test_connection.py       2021-02-14 19:55:05.694431685 +0100
119 @@ -20,7 +20,10 @@
120  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
121  # IN THE SOFTWARE.
122  #
123 -from mock import Mock
124 +try:
125 +    from mock import Mock
126 +except ImportError:
127 +    from unittest.mock import Mock
128  from tests.unit import unittest
129  
130  import boto.ec2containerservice
131 --- boto-2.49.0/tests/unit/ec2/test_connection.py.orig  2018-07-11 19:35:36.000000000 +0200
132 +++ boto-2.49.0/tests/unit/ec2/test_connection.py       2021-02-14 20:02:23.685392218 +0100
133 @@ -1,6 +1,9 @@
134  #!/usr/bin/env python
135  from datetime import datetime, timedelta
136 -from mock import MagicMock, Mock
137 +try:
138 +    from mock import MagicMock, Mock
139 +except ImportError:
140 +    from unittest.mock import MagicMock, Mock
141  from tests.unit import unittest
142  from tests.unit import AWSMockServiceTestCase
143  
144 --- boto-2.49.0/tests/unit/glacier/test_layer2.py.orig  2018-07-11 19:35:36.000000000 +0200
145 +++ boto-2.49.0/tests/unit/glacier/test_layer2.py       2021-02-14 19:58:41.029931779 +0100
146 @@ -23,7 +23,10 @@
147  
148  from tests.unit import unittest
149  
150 -from mock import call, Mock, patch, sentinel
151 +try:
152 +    from mock import call, Mock, patch, sentinel
153 +except ImportError:
154 +    from unittest.mock import call, Mock, patch, sentinel
155  
156  import codecs
157  from boto.glacier.layer1 import Layer1
158 --- boto-2.49.0/tests/unit/glacier/test_writer.py.orig  2018-07-11 22:41:30.000000000 +0200
159 +++ boto-2.49.0/tests/unit/glacier/test_writer.py       2021-02-14 19:59:16.493072992 +0100
160 @@ -24,11 +24,19 @@ import itertools
161  from boto.compat import StringIO
162  
163  from tests.unit import unittest
164 -from mock import (
165 -    call,
166 -    Mock,
167 -    sentinel,
168 -)
169 +try:
170 +    from mock import (
171 +        call,
172 +        Mock,
173 +        sentinel,
174 +    )
175 +except ImportError:
176 +    from unittest.mock import (
177 +        call,
178 +        Mock,
179 +        sentinel,
180 +    )
181 +
182  from nose.tools import assert_equal
183  
184  from boto.glacier.layer1 import Layer1
185 --- boto-2.49.0/tests/unit/mws/test_connection.py.orig  2018-07-11 19:35:36.000000000 +0200
186 +++ boto-2.49.0/tests/unit/mws/test_connection.py       2021-02-14 19:57:56.120175076 +0100
187 @@ -29,7 +29,10 @@ from tests.compat import unittest
188  
189  from tests.unit import AWSMockServiceTestCase
190  
191 -from mock import MagicMock
192 +try:
193 +    from mock import MagicMock
194 +except ImportError:
195 +    from unittest.mock import MagicMock
196  
197  
198  class TestMWSConnection(AWSMockServiceTestCase):
199 --- boto-2.49.0/tests/unit/s3/test_bucketlistresultset.py.orig  2018-07-11 19:35:36.000000000 +0200
200 +++ boto-2.49.0/tests/unit/s3/test_bucketlistresultset.py       2021-02-14 19:56:36.633939023 +0100
201 @@ -22,7 +22,10 @@
202  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
203  # IN THE SOFTWARE.
204  
205 -from mock import patch, Mock
206 +try:
207 +    from mock import patch, Mock
208 +except ImportError:
209 +    from unittest.mock import patch, Mock
210  import unittest
211  
212  from boto.s3.bucket import ResultSet
213 --- boto-2.49.0/tests/unit/s3/test_bucket.py.orig       2018-07-11 19:35:36.000000000 +0200
214 +++ boto-2.49.0/tests/unit/s3/test_bucket.py    2021-02-14 19:56:54.867173579 +0100
215 @@ -1,5 +1,8 @@
216  # -*- coding: utf-8 -*-
217 -from mock import patch
218 +try:
219 +    from mock import patch
220 +except ImportError:
221 +    from unittest.mock import patch
222  import xml.dom.minidom
223  
224  from tests.unit import unittest
225 --- boto-2.49.0/tests/unit/sns/test_connection.py.orig  2018-07-11 19:35:36.000000000 +0200
226 +++ boto-2.49.0/tests/unit/sns/test_connection.py       2021-02-14 19:57:21.567028933 +0100
227 @@ -23,7 +23,10 @@
228  import json
229  from tests.unit import unittest
230  from tests.unit import AWSMockServiceTestCase
231 -from mock import Mock
232 +try:
233 +    from mock import Mock
234 +except ImportError:
235 +    from unittest.mock import Mock
236  
237  from boto.sns.connection import SNSConnection
238  
239 --- boto-2.49.0/tests/unit/sqs/test_queue.py.orig       2018-07-11 19:35:36.000000000 +0200
240 +++ boto-2.49.0/tests/unit/sqs/test_queue.py    2021-02-14 20:00:55.939200913 +0100
241 @@ -20,7 +20,10 @@
242  # IN THE SOFTWARE.
243  #
244  from tests.unit import unittest
245 -from mock import Mock
246 +try:
247 +    from mock import Mock
248 +except ImportError:
249 +    from unittest.mock import Mock
250  
251  from boto.sqs.queue import Queue
252  
253 --- boto-2.49.0/tests/unit/swf/test_layer2_actors.py.orig       2018-07-11 19:35:36.000000000 +0200
254 +++ boto-2.49.0/tests/unit/swf/test_layer2_actors.py    2021-02-14 20:01:29.175687522 +0100
255 @@ -1,7 +1,10 @@
256  import boto.swf.layer2
257  from boto.swf.layer2 import Decider, ActivityWorker
258  from tests.unit import unittest
259 -from mock import Mock
260 +try:
261 +    from mock import Mock
262 +except ImportError:
263 +    from unittest.mock import Mock
264  
265  
266  class TestActors(unittest.TestCase):
267 --- boto-2.49.0/tests/unit/swf/test_layer2_base.py.orig 2018-07-11 19:35:36.000000000 +0200
268 +++ boto-2.49.0/tests/unit/swf/test_layer2_base.py      2021-02-14 20:01:23.549051338 +0100
269 @@ -1,7 +1,10 @@
270  import boto.swf.layer2
271  from boto.swf.layer2 import SWFBase
272  from tests.unit import unittest
273 -from mock import Mock
274 +try:
275 +    from mock import Mock
276 +except ImportError:
277 +    from unittest.mock import Mock
278  
279  
280  MOCK_DOMAIN = 'Mock'
281 --- boto-2.49.0/tests/unit/swf/test_layer2_domain.py.orig       2018-07-11 19:35:36.000000000 +0200
282 +++ boto-2.49.0/tests/unit/swf/test_layer2_domain.py    2021-02-14 20:01:54.462217200 +0100
283 @@ -1,7 +1,10 @@
284  import boto.swf.layer2
285  from boto.swf.layer2 import Domain, ActivityType, WorkflowType, WorkflowExecution
286  from tests.unit import unittest
287 -from mock import Mock
288 +try:
289 +    from mock import Mock
290 +except ImportError:
291 +    from unittest.mock import Mock
292  
293  
294  class TestDomain(unittest.TestCase):
295 --- boto-2.49.0/tests/unit/swf/test_layer2_types.py.orig        2018-07-11 19:35:36.000000000 +0200
296 +++ boto-2.49.0/tests/unit/swf/test_layer2_types.py     2021-02-14 20:01:44.152273054 +0100
297 @@ -1,7 +1,10 @@
298  import boto.swf.layer2
299  from boto.swf.layer2 import ActivityType, WorkflowType, WorkflowExecution
300  from tests.unit import unittest
301 -from mock import Mock, ANY
302 +try:
303 +    from mock import Mock, ANY
304 +except ImportError:
305 +    from unittest.mock import Mock, ANY
306  
307  
308  class TestTypes(unittest.TestCase):
309 --- boto-2.49.0/tests/unit/test_endpoints.py.orig       2018-07-11 19:35:36.000000000 +0200
310 +++ boto-2.49.0/tests/unit/test_endpoints.py    2021-02-14 19:58:14.186743868 +0100
311 @@ -10,7 +10,7 @@
312  # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
313  # ANY KIND, either express or implied. See the License for the specific
314  # language governing permissions and limitations under the License.
315 -import mock
316 +from tests.compat import mock
317  import os
318  import json
319  
320 --- boto-2.49.0/tests/unit/test_regioninfo.py.orig      2018-07-11 19:35:36.000000000 +0200
321 +++ boto-2.49.0/tests/unit/test_regioninfo.py   2021-02-14 19:59:40.419610038 +0100
322 @@ -20,7 +20,7 @@
323  # IN THE SOFTWARE.
324  #
325  import os
326 -import mock
327 +from tests.compat import mock
328  
329  import boto
330  from boto.pyami.config import Config
This page took 0.623522 seconds and 3 git commands to generate.