Split commands properly for bash completion test.
The bash completion test was trying to loop over some options in order to test that they appeared in the output. This splits the list so that proper looping occurs. This helps protect against test failures when new options are added and the bash completion output changes order. Change-Id: I81517038953fb429e8d98b762c77749bbbc0e8d7
This commit is contained in:
parent
609cbcef17
commit
46cd432bc2
@ -102,7 +102,12 @@ class ShellTest(utils.TestCase):
|
||||
def test_bash_completion(self):
|
||||
stdout, stderr = self.shell('bash-completion')
|
||||
# just check we have some output
|
||||
required = ['--matching --wrap help secgroup-delete-rule --priority']
|
||||
required = [
|
||||
'.*--matching',
|
||||
'.*--wrap',
|
||||
'.*help',
|
||||
'.*secgroup-delete-rule',
|
||||
'.*--priority']
|
||||
for r in required:
|
||||
self.assertThat((stdout + stderr),
|
||||
matchers.MatchesRegex(r, re.DOTALL | re.MULTILINE))
|
||||
|
Loading…
x
Reference in New Issue
Block a user