diff options
author | Bin Sun <bins@vmware.com> | 2018-04-11 10:43:57 +0800 |
---|---|---|
committer | Bin Sun <bins@vmware.com> | 2018-04-11 10:44:15 +0800 |
commit | ebf932180888db33f2de110ad062fafa78a8a33d (patch) | |
tree | 1f0f98ba092116a381d4f12e5bb1d2818206952f | |
parent | b3c67a72743621523a9f2b6d1ac07237611818af (diff) |
Add fake get all stacks test
Change-Id: I986d0103169013a2d154c3dc9b3f848e72e7bfb1
Issue-ID: MULTICLOUD-199
Signed-off-by: Bin Sun <bins@vmware.com>
-rw-r--r-- | vio/vio/tests/test_fake_heat_view.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/vio/vio/tests/test_fake_heat_view.py b/vio/vio/tests/test_fake_heat_view.py index 01a7568..4a3d752 100644 --- a/vio/vio/tests/test_fake_heat_view.py +++ b/vio/vio/tests/test_fake_heat_view.py @@ -60,3 +60,21 @@ class TestFakeHeatServicePreview(unittest.TestCase): } resp = self.view.post(req, "1234abcd") self.assertEqual(201, resp.status_code) + + +class TestFakeHeatService(unittest.TestCase): + + def setUp(self): + self.view = views.FakeHeatService() + + @mock.patch.object(fakeResponse, "getAllStacks") + def test_get_heat_stacks(self, mock_getAllStacks): + req = mock.Mock() + req.META = { + "HTTP_X_AUTH_TOKEN": Token + } + mock_getAllStacks.return_value = { + "stack": "1234abcd" + } + resp = self.view.get(req, "1234abcd", STACK_NAME, STACK_ID) + self.assertEqual(200, resp.status_code) |