From 46cd432bc24ededc55560e84ef5ccd30384a69ff Mon Sep 17 00:00:00 2001 From: Andrew Laski <andrew.laski@rackspace.com> Date: Mon, 25 Mar 2013 13:03:38 -0400 Subject: [PATCH] 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 --- tests/test_shell.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_shell.py b/tests/test_shell.py index 4a8c3391a..7e71c5c92 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))