diff options
author | Andrew Laski <andrew.laski@rackspace.com> | 2013-03-25 13:03:38 -0400 |
---|---|---|
committer | Andrew Laski <andrew.laski@rackspace.com> | 2013-03-25 14:34:24 -0400 |
commit | 46cd432bc24ededc55560e84ef5ccd30384a69ff (patch) | |
tree | db59509d5cd95e402af2e2a3071abbdf7c638ba2 | |
parent | 609cbcef17cd0051ecb86bc60a29cf9c2be2517f (diff) | |
download | python-novaclient-46cd432bc24ededc55560e84ef5ccd30384a69ff.tar.gz |
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
-rw-r--r-- | tests/test_shell.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/test_shell.py b/tests/test_shell.py index 4a8c3391..7e71c5c9 100644 --- a/tests/test_shell.py +++ b/tests/test_shell.py @@ -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)) |