Skip to content

Commit 0c42c88

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Refactor module functional test"
2 parents 2cb1cee + 3258664 commit 0c42c88

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

openstackclient/tests/functional/common/test_module.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,15 @@ class ModuleTest(base.TestCase):
2929
'os_client_config',
3030
'keystoneauth1']
3131

32-
def test_module_list_no_options(self):
33-
json_output = json.loads(self.openstack('module list -f json'))
32+
def test_module_list(self):
33+
# Test module list
34+
cmd_output = json.loads(self.openstack('module list -f json'))
3435
for one_module in self.CLIENTS:
35-
self.assertIn(one_module, json_output.keys())
36-
37-
def test_module_list_with_all_option(self):
38-
json_output = json.loads(self.openstack('module list --all -f json'))
39-
for one_module in (self.CLIENTS + self.LIBS):
40-
self.assertIn(one_module, json_output.keys())
36+
self.assertIn(one_module, cmd_output.keys())
37+
for one_module in self.LIBS:
38+
self.assertNotIn(one_module, cmd_output.keys())
39+
40+
# Test module list --all
41+
cmd_output = json.loads(self.openstack('module list --all -f json'))
42+
for one_module in self.CLIENTS + self.LIBS:
43+
self.assertIn(one_module, cmd_output.keys())

0 commit comments

Comments
 (0)