diff options
author | Ethan Lynn <ethanlynnl@vmware.com> | 2018-03-27 11:36:34 -0700 |
---|---|---|
committer | Ethan Lynn <ethanlynnl@vmware.com> | 2018-03-27 11:36:34 -0700 |
commit | 82d481e8f149e9b78b3176a37b9885657ef245b4 (patch) | |
tree | 0145fc2933d1f8dd95c3b57af20539d04636223f /vio | |
parent | a2039ec4efdc527b083a0059b05ae7533820ff51 (diff) |
Add test_get for IdentityVersionLink
Add test_get
Change-Id: I346a9f10bb2b51ab8aefb522828bf4c05abfb10f
Issue-ID: MULTICLOUD-199
Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
Diffstat (limited to 'vio')
-rw-r--r-- | vio/vio/tests/test_proxy_identity_view.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/vio/vio/tests/test_proxy_identity_view.py b/vio/vio/tests/test_proxy_identity_view.py index 729fba0..a8bf9fb 100644 --- a/vio/vio/tests/test_proxy_identity_view.py +++ b/vio/vio/tests/test_proxy_identity_view.py @@ -239,3 +239,26 @@ class TestTokenV2View(unittest.TestCase): mock_post.return_value = res resp = self.view.post(req, "vmware_nova") self.assertEqual(200, resp.status_code) + + +class TestIdentityVersionLink(unittest.TestCase): + + def setUp(self): + self.view = views.IdentityVersionLink() + + @mock.patch.object(BaseClient, "buildRequest") + @mock.patch.object(BaseClient, "_request") + def test_get(self, mock_req, mock_build): + mock_build.return_value = ("http://onap.org", {}, None) + res = mock.Mock() + res.status_code = 200 + res.data = { + "version": { + "links": [{ + "href": "" + }] + } + } + mock_req.return_value = res + resp = self.view.get(mock.Mock(), "vmware_nova") + self.assertEqual(200, resp.status_code) |