diff options
Diffstat (limited to 'newton/newton/pub/tests/test_extsys.py')
-rw-r--r-- | newton/newton/pub/tests/test_extsys.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/newton/newton/pub/tests/test_extsys.py b/newton/newton/pub/tests/test_extsys.py index 5ddbbcba..239ebe00 100644 --- a/newton/newton/pub/tests/test_extsys.py +++ b/newton/newton/pub/tests/test_extsys.py @@ -15,6 +15,7 @@ import json import mock +from rest_framework import status import six import unittest @@ -68,9 +69,13 @@ class TestEpaCaps(unittest.TestCase): def test_get_vim_by_id(self): values = [ - (1, "test_content", 500), # Failure first call - (0, json.dumps(MOCK_VIM_INFO), None), (1, "test_content", 500), # Failure second call - (0, json.dumps(MOCK_VIM_INFO), None), (0, json.dumps(MOCK_ESR_SYSTEM_INFO), None) # Success calls + (1, "test_content", + status.HTTP_500_INTERNAL_SERVER_ERROR), # Failure first call + (0, json.dumps(MOCK_VIM_INFO), None), + (1, "test_content", + status.HTTP_500_INTERNAL_SERVER_ERROR), # Failure second call + (0, json.dumps(MOCK_VIM_INFO), None), + (0, json.dumps(MOCK_ESR_SYSTEM_INFO), None) # Success calls ] restcall.req_to_aai = mock.Mock(side_effect=returnList(values)) |