From 5754c4bcbc9677f8b306c3f29a8574693df0e278 Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Thu, 20 Feb 2014 04:37:39 +0900 Subject: [PATCH] Should specify expect_errors=False for success response In API unit tests, expect_errors=False should be specified when expecting 2xx API response. Closes-Bug: #1282401 Change-Id: Ib2d57aab16f73f234b3cb6ecfeecf2779bf17223 --- neutron/tests/unit/test_api_v2_resource.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/neutron/tests/unit/test_api_v2_resource.py b/neutron/tests/unit/test_api_v2_resource.py index ed3ea33fc..298283cb9 100644 --- a/neutron/tests/unit/test_api_v2_resource.py +++ b/neutron/tests/unit/test_api_v2_resource.py @@ -311,7 +311,7 @@ class ResourceTestCase(base.BaseTestCase): resource = webtest.TestApp(wsgi_resource.Resource(controller)) environ = {'wsgiorg.routing_args': (None, {'action': 'test'})} - res = resource.get('', extra_environ=environ, expect_errors=True) + res = resource.get('', extra_environ=environ) self.assertEqual(res.status_int, 200) def test_status_204(self): @@ -321,7 +321,7 @@ class ResourceTestCase(base.BaseTestCase): resource = webtest.TestApp(wsgi_resource.Resource(controller)) environ = {'wsgiorg.routing_args': (None, {'action': 'delete'})} - res = resource.delete('', extra_environ=environ, expect_errors=True) + res = resource.delete('', extra_environ=environ) self.assertEqual(res.status_int, 204) def test_no_route_args(self): @@ -341,5 +341,5 @@ class ResourceTestCase(base.BaseTestCase): environ = {'wsgiorg.routing_args': (None, {'action': 'test'})} res = resource.post('', params='{"key": "val"}', - extra_environ=environ, expect_errors=True) + extra_environ=environ) self.assertEqual(res.status_int, 200) -- 2.45.2