diff options
author | Bin Sun <bins@vmware.com> | 2018-04-11 11:11:29 +0800 |
---|---|---|
committer | Bin Sun <bins@vmware.com> | 2018-04-11 11:11:52 +0800 |
commit | 834c54cde65e9d377f1e45d80a6cec67bf66bf86 (patch) | |
tree | 00b2b2cc18409c19e13407cc14ea7bc5a40d98d0 /vio | |
parent | 107d08f19a6a8f96b0c6d4066fe6d2fd0caffe80 (diff) |
Add fake delete stack test
Change-Id: Ief4aff603f6b65fb9b37817665797033e6ba66b4
Issue-ID: MULTICLOUD-199
Signed-off-by: Bin Sun <bins@vmware.com>
Diffstat (limited to 'vio')
-rw-r--r-- | vio/vio/tests/test_fake_heat_view.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/vio/vio/tests/test_fake_heat_view.py b/vio/vio/tests/test_fake_heat_view.py index 56a8270..3cdb41a 100644 --- a/vio/vio/tests/test_fake_heat_view.py +++ b/vio/vio/tests/test_fake_heat_view.py @@ -91,3 +91,15 @@ class TestFakeHeatService(unittest.TestCase): } resp = self.view.post(req, "1234abcd") self.assertEqual(201, resp.status_code) + + @mock.patch.object(fakeResponse, "deleteStack") + def test_delete_heat_stacks(self, mock_deleteStack): + req = mock.Mock() + req.META = { + "HTTP_X_AUTH_TOKEN": Token + } + mock_deleteStack.return_value = { + "" + } + resp = self.view.delete(req, "1234abcd", STACK_NAME, STACK_ID) + self.assertEqual(204, resp.status_code) |