diff options
| author | Jenkins <jenkins@review.openstack.org> | 2017-02-13 17:27:39 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2017-02-13 17:27:39 +0000 |
| commit | 0c42c88d8873ebc4a8b6a312d81a6afaec00cfd4 (patch) | |
| tree | cb74cb1719935dd861996aeb636bf7a2befaae3f /openstackclient/tests/functional | |
| parent | 2cb1cee361d9c426a01cbb06a6a23989f7561727 (diff) | |
| parent | 3258664c7a2ab7a4fda3ed5e46ec4768ca6c56e8 (diff) | |
| download | python-openstackclient-0c42c88d8873ebc4a8b6a312d81a6afaec00cfd4.tar.gz | |
Merge "Refactor module functional test"
Diffstat (limited to 'openstackclient/tests/functional')
| -rw-r--r-- | openstackclient/tests/functional/common/test_module.py | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/openstackclient/tests/functional/common/test_module.py b/openstackclient/tests/functional/common/test_module.py index f56c1627..b56c83ad 100644 --- a/openstackclient/tests/functional/common/test_module.py +++ b/openstackclient/tests/functional/common/test_module.py @@ -29,12 +29,15 @@ class ModuleTest(base.TestCase): 'os_client_config', 'keystoneauth1'] - def test_module_list_no_options(self): - json_output = json.loads(self.openstack('module list -f json')) + def test_module_list(self): + # Test module list + cmd_output = json.loads(self.openstack('module list -f json')) for one_module in self.CLIENTS: - self.assertIn(one_module, json_output.keys()) - - def test_module_list_with_all_option(self): - json_output = json.loads(self.openstack('module list --all -f json')) - for one_module in (self.CLIENTS + self.LIBS): - self.assertIn(one_module, json_output.keys()) + self.assertIn(one_module, cmd_output.keys()) + for one_module in self.LIBS: + self.assertNotIn(one_module, cmd_output.keys()) + + # Test module list --all + cmd_output = json.loads(self.openstack('module list --all -f json')) + for one_module in self.CLIENTS + self.LIBS: + self.assertIn(one_module, cmd_output.keys()) |
