Browse Source

Remove mox3 completely

The porting of mock is complete. This fullfills the
community goal
200~"Remove Use of mox/mox3 for Testing" set for Rocky:
https://governance.openstack.org/tc/goals/rocky/mox_removal.html

This commit does the following code:
- Remove dead code that was previously used by mox.
- Raise the requirement to the Rocky M2 relase of Horizon.
- Convert the clients to use mock.

Change-Id: I33521b4bc8e873d50b1d2390e544eea0923dca4f
Signed-off-by: Chuck Short <chucks@redhat.com>
Chuck Short 9 months ago
parent
commit
fbbd58a459

+ 6
- 69
heat_dashboard/test/helpers.py View File

@@ -16,7 +16,6 @@
16 16
 #    License for the specific language governing permissions and limitations
17 17
 #    under the License.
18 18
 
19
-from functools import wraps
20 19
 from importlib import import_module
21 20
 import os
22 21
 import traceback
@@ -59,61 +58,6 @@ IsA = helpers.IsA
59 58
 IsHttpRequest = helpers.IsHttpRequest
60 59
 
61 60
 
62
-def create_stubs(stubs_to_create=None):
63
-    """decorator to simplify setting up multiple stubs at once via mox
64
-
65
-    :param stubs_to_create: methods to stub in one or more modules
66
-    :type stubs_to_create: dict
67
-
68
-    The keys are python paths to the module containing the methods to mock.
69
-
70
-    To mock a method in openstack_dashboard/api/nova.py, the key is::
71
-
72
-        api.nova
73
-
74
-    The values are either a tuple or list of methods to mock in the module
75
-    indicated by the key.
76
-
77
-    For example::
78
-
79
-        ('server_list',)
80
-            -or-
81
-        ('flavor_list', 'server_list',)
82
-            -or-
83
-        ['flavor_list', 'server_list']
84
-
85
-    Additionally, multiple modules can be mocked at once::
86
-
87
-        {
88
-            api.nova: ('flavor_list', 'server_list'),
89
-            api.glance: ('image_list_detailed',),
90
-        }
91
-
92
-    """
93
-    if stubs_to_create is None:
94
-        stubs_to_create = {}
95
-    if not isinstance(stubs_to_create, dict):
96
-        raise TypeError("create_stub must be passed a dict, but a %s was "
97
-                        "given." % type(stubs_to_create).__name__)
98
-
99
-    def inner_stub_out(fn):
100
-        @wraps(fn)
101
-        def instance_stub_out(self, *args, **kwargs):
102
-            for key in stubs_to_create:
103
-                if not (isinstance(stubs_to_create[key], tuple) or
104
-                        isinstance(stubs_to_create[key], list)):
105
-                    raise TypeError("The values of the create_stub "
106
-                                    "dict must be lists or tuples, but "
107
-                                    "is a %s."
108
-                                    % type(stubs_to_create[key]).__name__)
109
-
110
-                for value in stubs_to_create[key]:
111
-                    self.mox.StubOutWithMock(key, value)
112
-            return fn(self, *args, **kwargs)
113
-        return instance_stub_out
114
-    return inner_stub_out
115
-
116
-
117 61
 def _apply_panel_mocks(patchers=None):
118 62
     """Global mocks on panels that get called on all views."""
119 63
     if patchers is None:
@@ -172,10 +116,6 @@ class TestCase(horizon_helpers.TestCase):
172 116
     # boolean variable to store failures
173 117
     missing_mocks = False
174 118
 
175
-    # heat-dashboard depends on mox and we need to declare it.
176
-    # horizon UT disables mox by default now.
177
-    use_mox = True
178
-
179 119
     def fake_conn_request(self):
180 120
         # print a stacktrace to illustrate where the unmocked API call
181 121
         # is being made from
@@ -379,7 +319,6 @@ class BaseAdminViewTests(TestCase):
379 319
 
380 320
     For testing admin-only views and functionality.
381 321
     """
382
-    use_mox = True
383 322
 
384 323
     def setActiveUser(self, *args, **kwargs):
385 324
         if "roles" not in kwargs:
@@ -404,7 +343,6 @@ class APITestCase(TestCase):
404 343
     For use with tests which deal with the underlying clients rather than
405 344
     stubbing out the openstack_dashboard.api.* methods.
406 345
     """
407
-    use_mox = True
408 346
 
409 347
     def setUp(self):
410 348
         super(APITestCase, self).setUp()
@@ -434,7 +372,7 @@ class APITestCase(TestCase):
434 372
 
435 373
     def stub_keystoneclient(self):
436 374
         if not hasattr(self, "keystoneclient"):
437
-            self.mox.StubOutWithMock(keystone_client, 'Client')
375
+            keystone_client.Client = mock.Mock()
438 376
             # NOTE(saschpe): Mock properties, MockObject.__init__ ignores them:
439 377
             keystone_client.Client.auth_token = 'foo'
440 378
             keystone_client.Client.service_catalog = None
@@ -442,25 +380,24 @@ class APITestCase(TestCase):
442 380
             keystone_client.Client.tenant_name = 'tenant_1'
443 381
             keystone_client.Client.management_url = ""
444 382
             keystone_client.Client.__dir__ = lambda: []
445
-            self.keystoneclient = self.mox.CreateMock(keystone_client.Client)
383
+            self.keystoneclient = keystone_client.Client
446 384
         return self.keystoneclient
447 385
 
448 386
     def stub_neutronclient(self):
449 387
         if not hasattr(self, "neutronclient"):
450
-            self.mox.StubOutWithMock(neutron_client, 'Client')
451
-            self.neutronclient = self.mox.CreateMock(neutron_client.Client)
388
+            neutron_client.Client = mock.Mock()
389
+            self.neutronclient = neutron_client.Client
452 390
         return self.neutronclient
453 391
 
454 392
     def stub_heatclient(self):
455 393
         if not hasattr(self, "heatclient"):
456
-            self.mox.StubOutWithMock(heat_client, 'Client')
457
-            self.heatclient = self.mox.CreateMock(heat_client.Client)
394
+            heat_client.Client = mock.Mock()
395
+            self.heatclient = heat_client.Client
458 396
         return self.heatclient
459 397
 
460 398
 
461 399
 # Need this to test both Glance API V1 and V2 versions
462 400
 class ResetImageAPIVersionMixin(object):
463
-    use_mox = True
464 401
 
465 402
     def setUp(self):
466 403
         super(ResetImageAPIVersionMixin, self).setUp()

+ 65
- 75
heat_dashboard/test/tests/api/test_heat.py View File

@@ -9,6 +9,7 @@
9 9
 #    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 10
 #    License for the specific language governing permissions and limitations
11 11
 #    under the License.
12
+import mock
12 13
 import six
13 14
 
14 15
 from django.conf import settings
@@ -22,20 +23,18 @@ from horizon import exceptions
22 23
 
23 24
 class HeatApiTests(test.APITestCase):
24 25
 
25
-    use_mox = True
26
-
27 26
     def test_stack_list(self):
28 27
         api_stacks = self.stacks.list()
29 28
         limit = getattr(settings, 'API_RESULT_LIMIT', 1000)
30 29
 
31 30
         heatclient = self.stub_heatclient()
32
-        heatclient.stacks = self.mox.CreateMockAnything()
33
-        heatclient.stacks.list(limit=limit,
34
-                               sort_dir='desc',
35
-                               sort_key='created_at',) \
36
-            .AndReturn(iter(api_stacks))
37
-        self.mox.ReplayAll()
31
+        heatclient.stacks = mock.Mock()
32
+        heatclient.stacks.list.return_value = iter(api_stacks)
38 33
         stacks, has_more, has_prev = api.heat.stacks_list(self.request)
34
+        heatclient.stacks.list.assert_called_once_with(limit=limit,
35
+                                                       sort_dir='desc',
36
+                                                       sort_key='created_at',
37
+                                                       )
39 38
         self.assertItemsEqual(stacks, api_stacks)
40 39
         self.assertFalse(has_more)
41 40
         self.assertFalse(has_prev)
@@ -49,12 +48,8 @@ class HeatApiTests(test.APITestCase):
49 48
         sort_key = 'size'
50 49
 
51 50
         heatclient = self.stub_heatclient()
52
-        heatclient.stacks = self.mox.CreateMockAnything()
53
-        heatclient.stacks.list(limit=limit,
54
-                               sort_dir=sort_dir,
55
-                               sort_key=sort_key,) \
56
-            .AndReturn(iter(api_stacks))
57
-        self.mox.ReplayAll()
51
+        heatclient.stacks = mock.Mock()
52
+        heatclient.stacks.list.return_value = iter(api_stacks)
58 53
 
59 54
         stacks, has_more, has_prev = api.heat.stacks_list(self.request,
60 55
                                                           sort_dir=sort_dir,
@@ -62,6 +57,8 @@ class HeatApiTests(test.APITestCase):
62 57
         self.assertItemsEqual(stacks, api_stacks)
63 58
         self.assertFalse(has_more)
64 59
         self.assertFalse(has_prev)
60
+        heatclient.stacks.list.assert_called_once_with(
61
+            limit=limit, sort_dir=sort_dir, sort_key=sort_key,)
65 62
 
66 63
     @override_settings(API_RESULT_PAGE_SIZE=20)
67 64
     def test_stack_list_pagination_less_page_size(self):
@@ -71,12 +68,8 @@ class HeatApiTests(test.APITestCase):
71 68
         sort_key = 'created_at'
72 69
 
73 70
         heatclient = self.stub_heatclient()
74
-        heatclient.stacks = self.mox.CreateMockAnything()
75
-        heatclient.stacks.list(limit=page_size + 1,
76
-                               sort_dir=sort_dir,
77
-                               sort_key=sort_key,) \
78
-            .AndReturn(iter(api_stacks))
79
-        self.mox.ReplayAll()
71
+        heatclient.stacks = mock.Mock()
72
+        heatclient.stacks.list.return_value = iter(api_stacks)
80 73
 
81 74
         stacks, has_more, has_prev = api.heat.stacks_list(self.request,
82 75
                                                           sort_dir=sort_dir,
@@ -86,6 +79,10 @@ class HeatApiTests(test.APITestCase):
86 79
         self.assertItemsEqual(stacks, expected_stacks)
87 80
         self.assertFalse(has_more)
88 81
         self.assertFalse(has_prev)
82
+        heatclient.stacks.list.assert_called_once_with(
83
+            limit=page_size + 1,
84
+            sort_dir=sort_dir,
85
+            sort_key=sort_key)
89 86
 
90 87
     @override_settings(API_RESULT_PAGE_SIZE=10)
91 88
     def test_stack_list_pagination_equal_page_size(self):
@@ -95,12 +92,8 @@ class HeatApiTests(test.APITestCase):
95 92
         sort_key = 'created_at'
96 93
 
97 94
         heatclient = self.stub_heatclient()
98
-        heatclient.stacks = self.mox.CreateMockAnything()
99
-        heatclient.stacks.list(limit=page_size + 1,
100
-                               sort_dir=sort_dir,
101
-                               sort_key=sort_key,) \
102
-            .AndReturn(iter(api_stacks))
103
-        self.mox.ReplayAll()
95
+        heatclient.stacks = mock.Mock()
96
+        heatclient.stacks.list.return_value = iter(api_stacks)
104 97
 
105 98
         stacks, has_more, has_prev = api.heat.stacks_list(self.request,
106 99
                                                           sort_dir=sort_dir,
@@ -110,6 +103,9 @@ class HeatApiTests(test.APITestCase):
110 103
         self.assertItemsEqual(stacks, expected_stacks)
111 104
         self.assertFalse(has_more)
112 105
         self.assertFalse(has_prev)
106
+        heatclient.stacks.list.assert_called_once_with(
107
+            limit=page_size + 1, sort_dir=sort_dir,
108
+            sort_key=sort_key,)
113 109
 
114 110
     @override_settings(API_RESULT_PAGE_SIZE=2)
115 111
     def test_stack_list_pagination_marker(self):
@@ -121,13 +117,8 @@ class HeatApiTests(test.APITestCase):
121 117
         api_stacks = self.stacks.list()
122 118
 
123 119
         heatclient = self.stub_heatclient()
124
-        heatclient.stacks = self.mox.CreateMockAnything()
125
-        heatclient.stacks.list(limit=page_size + 1,
126
-                               marker=marker,
127
-                               sort_dir=sort_dir,
128
-                               sort_key=sort_key,) \
129
-            .AndReturn(iter(api_stacks[:page_size + 1]))
130
-        self.mox.ReplayAll()
120
+        heatclient.stacks = mock.Mock()
121
+        heatclient.stacks.list.return_value = iter(api_stacks[:page_size + 1])
131 122
 
132 123
         stacks, has_more, has_prev = api.heat.stacks_list(self.request,
133 124
                                                           marker=marker,
@@ -139,6 +130,9 @@ class HeatApiTests(test.APITestCase):
139 130
         self.assertItemsEqual(stacks, api_stacks[:page_size])
140 131
         self.assertTrue(has_more)
141 132
         self.assertTrue(has_prev)
133
+        heatclient.stacks.list.assert_called_once_with(
134
+            limit=page_size + 1, marker=marker,
135
+            sort_dir=sort_dir, sort_key=sort_key,)
142 136
 
143 137
     @override_settings(API_RESULT_PAGE_SIZE=2)
144 138
     def test_stack_list_pagination_marker_prev(self):
@@ -150,13 +144,8 @@ class HeatApiTests(test.APITestCase):
150 144
         api_stacks = self.stacks.list()
151 145
 
152 146
         heatclient = self.stub_heatclient()
153
-        heatclient.stacks = self.mox.CreateMockAnything()
154
-        heatclient.stacks.list(limit=page_size + 1,
155
-                               marker=marker,
156
-                               sort_dir=sort_dir,
157
-                               sort_key=sort_key,) \
158
-            .AndReturn(iter(api_stacks[:page_size + 1]))
159
-        self.mox.ReplayAll()
147
+        heatclient.stacks = mock.Mock()
148
+        heatclient.stacks.list.return_value = iter(api_stacks[:page_size + 1])
160 149
 
161 150
         stacks, has_more, has_prev = api.heat.stacks_list(self.request,
162 151
                                                           marker=marker,
@@ -168,6 +157,9 @@ class HeatApiTests(test.APITestCase):
168 157
         self.assertItemsEqual(stacks, api_stacks[:page_size])
169 158
         self.assertTrue(has_more)
170 159
         self.assertTrue(has_prev)
160
+        heatclient.stacks.list.assert_called_once_with(
161
+            limit=page_size + 1, marker=marker,
162
+            sort_dir=sort_dir, sort_key=sort_key,)
171 163
 
172 164
     def test_template_get(self):
173 165
         api_stacks = self.stacks.list()
@@ -175,29 +167,29 @@ class HeatApiTests(test.APITestCase):
175 167
         mock_data_template = self.stack_templates.list()[0]
176 168
 
177 169
         heatclient = self.stub_heatclient()
178
-        heatclient.stacks = self.mox.CreateMockAnything()
179
-        heatclient.stacks.template(stack_id).AndReturn(mock_data_template)
180
-        self.mox.ReplayAll()
170
+        heatclient.stacks = mock.Mock()
171
+        heatclient.stacks.template.return_value = mock_data_template
181 172
 
182 173
         template = api.heat.template_get(self.request, stack_id)
183 174
         self.assertEqual(mock_data_template.data, template.data)
175
+        heatclient.stacks.template.assert_called_once_with(stack_id)
184 176
 
185 177
     def test_stack_create(self):
186 178
         api_stacks = self.stacks.list()
187 179
         stack = api_stacks[0]
188 180
 
189 181
         heatclient = self.stub_heatclient()
190
-        heatclient.stacks = self.mox.CreateMockAnything()
182
+        heatclient.stacks = mock.Mock()
191 183
         form_data = {'timeout_mins': 600}
192 184
         password = 'secret'
193
-        heatclient.stacks.create(**form_data).AndReturn(stack)
194
-        self.mox.ReplayAll()
185
+        heatclient.stacks.create.return_value = stack
195 186
 
196 187
         returned_stack = api.heat.stack_create(self.request,
197 188
                                                password,
198 189
                                                **form_data)
199 190
         from heatclient.v1 import stacks
200 191
         self.assertIsInstance(returned_stack, stacks.Stack)
192
+        heatclient.stack.create_assert_called_once_with(**form_data)
201 193
 
202 194
     def test_stack_update(self):
203 195
         api_stacks = self.stacks.list()
@@ -205,11 +197,10 @@ class HeatApiTests(test.APITestCase):
205 197
         stack_id = stack.id
206 198
 
207 199
         heatclient = self.stub_heatclient()
208
-        heatclient.stacks = self.mox.CreateMockAnything()
200
+        heatclient.stacks = mock.Mock()
209 201
         form_data = {'timeout_mins': 600}
210 202
         password = 'secret'
211
-        heatclient.stacks.update(stack_id, **form_data).AndReturn(stack)
212
-        self.mox.ReplayAll()
203
+        heatclient.stacks.update.return_value = stack
213 204
 
214 205
         returned_stack = api.heat.stack_update(self.request,
215 206
                                                stack_id,
@@ -217,33 +208,35 @@ class HeatApiTests(test.APITestCase):
217 208
                                                **form_data)
218 209
         from heatclient.v1 import stacks
219 210
         self.assertIsInstance(returned_stack, stacks.Stack)
211
+        heatclient.stacks.update.assert_called_once_with(
212
+            stack_id, **form_data)
220 213
 
221 214
     def test_snapshot_create(self):
222 215
         stack_id = self.stacks.first().id
223 216
         snapshot_create = self.stack_snapshot_create.list()[0]
224 217
 
225 218
         heatclient = self.stub_heatclient()
226
-        heatclient.stacks = self.mox.CreateMockAnything()
227
-        heatclient.stacks.snapshot(stack_id).AndReturn(snapshot_create)
228
-        self.mox.ReplayAll()
219
+        heatclient.stacks = mock.Mock()
220
+        heatclient.stacks.snapshot.return_value = snapshot_create
229 221
 
230 222
         returned_snapshot_create_info = api.heat.snapshot_create(self.request,
231 223
                                                                  stack_id)
232 224
 
233 225
         self.assertEqual(returned_snapshot_create_info, snapshot_create)
226
+        heatclient.stacks.snapshot.assert_called_once_with(stack_id)
234 227
 
235 228
     def test_snapshot_list(self):
236 229
         stack_id = self.stacks.first().id
237 230
         snapshot_list = self.stack_snapshot.list()
238 231
 
239 232
         heatclient = self.stub_heatclient()
240
-        heatclient.stacks = self.mox.CreateMockAnything()
241
-        heatclient.stacks.snapshot_list(stack_id).AndReturn(snapshot_list)
242
-        self.mox.ReplayAll()
233
+        heatclient.stacks = mock.Mock()
234
+        heatclient.stacks.snapshot_list.return_value = snapshot_list
243 235
 
244 236
         returned_snapshots = api.heat.snapshot_list(self.request, stack_id)
245 237
 
246 238
         self.assertItemsEqual(returned_snapshots, snapshot_list)
239
+        heatclient.stacks.snapshot_list.assert_called_once_with(stack_id)
247 240
 
248 241
     def test_get_template_files_with_template_data(self):
249 242
         tmpl = '''
@@ -261,7 +254,8 @@ class HeatApiTests(test.APITestCase):
261 254
         files = api.heat.get_template_files(template_data=tmpl)[0]
262 255
         self.assertEqual(files, expected_files)
263 256
 
264
-    def test_get_template_files(self):
257
+    @mock.patch.object(six.moves.urllib.request, 'urlopen')
258
+    def test_get_template_files(self, mock_request):
265 259
         tmpl = '''
266 260
     # comment
267 261
 
@@ -279,14 +273,14 @@ class HeatApiTests(test.APITestCase):
279 273
         expected_files = {u'http://test.example/example': b'echo "test"'}
280 274
         url = 'http://test.example/example'
281 275
         data = b'echo "test"'
282
-        self.mox.StubOutWithMock(six.moves.urllib.request, 'urlopen')
283
-        six.moves.urllib.request.urlopen(url).AndReturn(
284
-            six.BytesIO(data))
285
-        self.mox.ReplayAll()
276
+        mock_request.return_value = six.BytesIO(data)
277
+
286 278
         files = api.heat.get_template_files(template_data=tmpl)[0]
287 279
         self.assertEqual(files, expected_files)
280
+        mock_request.assert_called_once_with(url)
288 281
 
289
-    def test_get_template_files_with_template_url(self):
282
+    @mock.patch.object(six.moves.urllib.request, 'urlopen')
283
+    def test_get_template_files_with_template_url(self, mock_request):
290 284
         url = 'https://test.example/example.yaml'
291 285
         data = b'''
292 286
     # comment
@@ -302,15 +296,11 @@ class HeatApiTests(test.APITestCase):
302 296
             user_data:
303 297
               get_file: http://test.example/example
304 298
     '''
305
-        url2 = 'http://test.example/example'
306 299
         data2 = b'echo "test"'
307 300
         expected_files = {'http://test.example/example': b'echo "test"'}
308
-        self.mox.StubOutWithMock(six.moves.urllib.request, 'urlopen')
309
-        six.moves.urllib.request.urlopen(url).AndReturn(
310
-            six.BytesIO(data))
311
-        six.moves.urllib.request.urlopen(url2).AndReturn(
312
-            six.BytesIO(data2))
313
-        self.mox.ReplayAll()
301
+        mock_request.side_effect = \
302
+            [six.BytesIO(data), six.BytesIO(data2)]
303
+
314 304
         files = api.heat.get_template_files(template_url=url)[0]
315 305
         self.assertEqual(files, expected_files)
316 306
 
@@ -338,25 +328,25 @@ class HeatApiTests(test.APITestCase):
338 328
         api_template_versions = self.template_versions.list()
339 329
 
340 330
         heatclient = self.stub_heatclient()
341
-        heatclient.template_versions = self.mox.CreateMockAnything()
342
-        heatclient.template_versions.list().AndReturn(api_template_versions)
343
-        self.mox.ReplayAll()
331
+        heatclient.template_versions = mock.Mock()
332
+        heatclient.template_versions.list.return_value = api_template_versions
344 333
 
345 334
         template_versions = api.heat.template_version_list(self.request)
346 335
 
347 336
         self.assertItemsEqual(template_versions, api_template_versions)
337
+        heatclient.template_versions.list.assert_called_once_with()
348 338
 
349 339
     def test_template_function_list(self):
350 340
         template_version = self.template_versions.first().version
351 341
         api_template_functions = self.template_functions.list()
352 342
 
353 343
         heatclient = self.stub_heatclient()
354
-        heatclient.template_versions = self.mox.CreateMockAnything()
355
-        heatclient.template_versions.get(
356
-            template_version).AndReturn(api_template_functions)
357
-        self.mox.ReplayAll()
344
+        heatclient.template_versions = mock.Mock()
345
+        heatclient.template_versions.get.return_value = api_template_functions
358 346
 
359 347
         template_functions = api.heat.template_function_list(
360 348
             self.request, template_version)
361 349
 
362 350
         self.assertItemsEqual(template_functions, api_template_functions)
351
+        heatclient.template_versions.get.assert_called_once_with(
352
+            template_version)

+ 0
- 2
heat_dashboard/test/tests/content/test_resource_types.py View File

@@ -20,8 +20,6 @@ from heat_dashboard.test.helpers import IsHttpRequest
20 20
 
21 21
 class ResourceTypesTests(test.TestCase):
22 22
 
23
-    use_mox = False
24
-
25 23
     @test.create_mocks({api.heat: ('resource_types_list',)})
26 24
     def test_index(self):
27 25
         self.mock_resource_types_list.return_value = \

+ 0
- 6
heat_dashboard/test/tests/content/test_stacks.py View File

@@ -44,8 +44,6 @@ class MockResource(object):
44 44
 
45 45
 class MappingsTests(test.TestCase):
46 46
 
47
-    use_mox = False
48
-
49 47
     def test_mappings(self):
50 48
 
51 49
         def assertMappingUrl(url, resource_type, physical_resource_id):
@@ -117,8 +115,6 @@ class MappingsTests(test.TestCase):
117 115
 
118 116
 class StackTests(test.TestCase):
119 117
 
120
-    use_mox = False
121
-
122 118
     @override_settings(API_RESULT_PAGE_SIZE=2)
123 119
     @test.create_mocks({api.heat: ('stacks_list',)})
124 120
     def test_index_paginated(self):
@@ -876,8 +872,6 @@ class StackTests(test.TestCase):
876 872
 
877 873
 class TemplateFormTests(test.TestCase):
878 874
 
879
-    use_mox = False
880
-
881 875
     class SimpleFile(object):
882 876
         def __init__(self, name, data):
883 877
             self.name = name

+ 0
- 2
heat_dashboard/test/tests/content/test_template_generator.py View File

@@ -22,8 +22,6 @@ from heat_dashboard.test import helpers as test
22 22
 
23 23
 class TemplateGeneratorTests(test.TestCase):
24 24
 
25
-    use_mox = False
26
-
27 25
     def test_index(self):
28 26
         self.client.get(reverse('horizon:project:template_generator:index'))
29 27
         self.assertTemplateUsed(

+ 0
- 1
lower-constraints.txt View File

@@ -46,7 +46,6 @@ MarkupSafe==1.0
46 46
 mccabe==0.2.1
47 47
 mock==2.0.0
48 48
 monotonic==0.6
49
-mox3==0.20.0
50 49
 msgpack-python==0.4.0
51 50
 munch==2.1.0
52 51
 netaddr==0.7.18

+ 0
- 1
test-requirements.txt View File

@@ -13,6 +13,5 @@ coverage!=4.4,>=4.0 # Apache-2.0
13 13
 doc8>=0.6.0 # Apache-2.0
14 14
 flake8-import-order==0.12 # LGPLv3
15 15
 mock>=2.0.0 # BSD
16
-mox3>=0.20.0 # Apache-2.0
17 16
 nodeenv>=0.9.4 # BSD
18 17
 testtools>=2.2.0 # MIT

Loading…
Cancel
Save