From feec0bcd53f24b0383f9f2db3a7837fa08525947 Mon Sep 17 00:00:00 2001 From: Bin Yang Date: Tue, 2 Apr 2019 08:28:12 +0000 Subject: Refactor helper codes Move helper thread to common module Refactor the interface between helper thread and worker Change-Id: I0b61a2ed1a428f67cfbe3cc1411ace39e245932d Issue-ID: MULTICLOUD-554 Signed-off-by: Bin Yang --- ocata/ocata/registration/tests/test_registration.py | 2 +- ocata/ocata/registration/tests/test_registration2.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'ocata') diff --git a/ocata/ocata/registration/tests/test_registration.py b/ocata/ocata/registration/tests/test_registration.py index 2daca137..540f170b 100644 --- a/ocata/ocata/registration/tests/test_registration.py +++ b/ocata/ocata/registration/tests/test_registration.py @@ -294,7 +294,7 @@ class TestRegistration(test_base.TestRequest): "registry"), "{}", content_type="application/json", HTTP_X_AUTH_TOKEN=mock_info.MOCK_TOKEN_ID) - self.assertEquals(status.HTTP_500_INTERNAL_SERVER_ERROR, + self.assertEquals(status.HTTP_204_NO_CONTENT, response.status_code) @mock.patch.object(VimDriverUtils, 'get_session') diff --git a/ocata/ocata/registration/tests/test_registration2.py b/ocata/ocata/registration/tests/test_registration2.py index bfb7d7a5..13851763 100644 --- a/ocata/ocata/registration/tests/test_registration2.py +++ b/ocata/ocata/registration/tests/test_registration2.py @@ -92,12 +92,12 @@ class TestRegistration2(unittest.TestCase): } ) - resp = self.view.register_helper._discover_flavors( + retcode, content = self.view.register_helper._discover_flavors( vimid="windriver-hudson-dc_RegionOne", session=mock_session, viminfo=MOCK_VIM_INFO ) - self.assertIsNone(resp) + self.assertEquals(retcode, 0) def test_discover_flavors_w_hpa_numa(self): restcall.req_to_aai = mock.Mock() @@ -112,9 +112,9 @@ class TestRegistration2(unittest.TestCase): } ), - resp = self.view.register_helper._discover_flavors( + retcode, content = self.view.register_helper._discover_flavors( vimid="windriver-hudson-dc_RegionOne", session=mock_session, viminfo=MOCK_VIM_INFO ) - self.assertIsNone(resp) + self.assertEquals(retcode, 11) -- cgit 1.2.3-korg