diff options
author | Amey Bhide <abhide@vmware.com> | 2015-11-05 17:54:18 -0800 |
---|---|---|
committer | Bryan Jones <jonesbr@us.ibm.com> | 2016-02-12 15:22:01 +0000 |
commit | b696c52554b54cbe4cb74c7c45195718fb56014e (patch) | |
tree | 1f22ff74e937d7ee175d3a48851b4537370c77d5 /heatclient/tests/unit/test_utils.py | |
parent | 57bb6e508ef3db61ab9f932dd4aaccd9758c3311 (diff) | |
download | python-heatclient-b696c52554b54cbe4cb74c7c45195718fb56014e.tar.gz |
OpenstackClient plugin for stack delete
This change implements the 'openstack stack delete' command.
Blueprint: heat-support-python-openstackclient
Change-Id: I95df1390a9daee7115ccda68b261e0a76530ade4
Diffstat (limited to 'heatclient/tests/unit/test_utils.py')
-rw-r--r-- | heatclient/tests/unit/test_utils.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/heatclient/tests/unit/test_utils.py b/heatclient/tests/unit/test_utils.py index 8237b4f..c58f788 100644 --- a/heatclient/tests/unit/test_utils.py +++ b/heatclient/tests/unit/test_utils.py @@ -188,6 +188,17 @@ class ShellTest(testtools.TestCase): self.assertEqual(expected, utils.event_log_formatter(events_list)) self.assertEqual('', utils.event_log_formatter([])) + def test_wait_for_delete(self): + def status_f(id): + raise exc.HTTPNotFound + + def bad_status_f(id): + return {'status': 'failed'} + + self.assertTrue(utils.wait_for_delete(status_f, 123)) + self.assertFalse(utils.wait_for_delete(status_f, 123, timeout=0)) + self.assertFalse(utils.wait_for_delete(bad_status_f, 123)) + class ShellTestParameterFiles(testtools.TestCase): |