diff options
author | Ethan Lynn <ethanlynnl@vmware.com> | 2018-06-13 14:40:43 +0800 |
---|---|---|
committer | Ethan Lynn <ethanlynnl@vmware.com> | 2018-06-13 14:40:43 +0800 |
commit | 177a094e0d10d817a3ee7508fdba1c77f5ca55c3 (patch) | |
tree | f41316a97554073c8ebbbb7fa7145fd8795bc81a | |
parent | a73d35d8241aa899afca01470ad444779bbd32f5 (diff) |
Add test_list_projects
Add test_list_projects
Change-Id: I7aabfd2ed48c82e6993b4416ffadd96a22e464a3
Issue-ID: MULTICLOUD-199
Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
-rw-r--r-- | vio/vio/tests/test_fake_identity_view.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/vio/vio/tests/test_fake_identity_view.py b/vio/vio/tests/test_fake_identity_view.py index e27a8c4..0bea44d 100644 --- a/vio/vio/tests/test_fake_identity_view.py +++ b/vio/vio/tests/test_fake_identity_view.py @@ -40,6 +40,15 @@ class TestFakeProjects(unittest.TestCase): resp = self.view.get(req, "1234abcd") self.assertEqual(200, resp.status_code) + def test_list_projects(self): + req = mock.Mock() + req.META = { + "HTTP_X_AUTH_TOKEN": Token + } + resp = self.view.get(req) + self.assertEqual(200, resp.status_code) + self.assertEqual(3, len(resp.data['projects'])) + class TestFakeToken(unittest.TestCase): |