diff options
author | Petr Viktorin <pviktori@redhat.com> | 2014-12-02 15:52:41 +0100 |
---|---|---|
committer | Tomas Babej <tbabej@redhat.com> | 2014-12-11 07:04:58 +0100 |
commit | a97d61df040111b9ce4585db262ddfaba24df4da (patch) | |
tree | 755036ccbd3fbb7b5dd992165d8788266c96b760 /ipatests | |
parent | d9ab11a2327f01243f73340bdc6cb91df629bf8e (diff) | |
download | freeipa-a97d61df040111b9ce4585db262ddfaba24df4da.tar.gz freeipa-a97d61df040111b9ce4585db262ddfaba24df4da.tar.xz freeipa-a97d61df040111b9ce4585db262ddfaba24df4da.zip |
test_integration: Parametrize test instead of using a generator
Reviewed-By: Tomas Babej <tbabej@redhat.com>
Diffstat (limited to 'ipatests')
-rw-r--r-- | ipatests/test_integration/test_caless.py | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/ipatests/test_integration/test_caless.py b/ipatests/test_integration/test_caless.py index d0263a9c9..426a4ad54 100644 --- a/ipatests/test_integration/test_caless.py +++ b/ipatests/test_integration/test_caless.py @@ -24,6 +24,7 @@ import base64 import glob import contextlib import nose +import pytest from ipalib import x509 from ipapython import ipautil @@ -1167,18 +1168,16 @@ class TestIPACommands(CALessBase): result = self.master.run_command(['ipa', command], raiseonerr=False) assert_error(result, "ipa: ERROR: unknown command '%s'" % command) - def test_cert_commands_unavailable(self): - for cmd in ( - 'cert-status', - 'cert-show', - 'cert-find', - 'cert-revoke', - 'cert-remove-hold', - 'cert-status'): - func = lambda: self.check_ipa_command_not_available(cmd) - func.description = 'Verify that %s command is not available' % cmd - func.test_argument = cmd - yield (func, ) + @pytest.mark.parametrize('command', ( + 'cert-status', + 'cert-show', + 'cert-find', + 'cert-revoke', + 'cert-remove-hold', + 'cert-status')) + def test_cert_commands_unavailable(self, command): + result = self.master.run_command(['ipa', command], raiseonerr=False) + assert_error(result, "ipa: ERROR: unknown command '%s'" % command) def test_cert_help_unavailable(self): "Verify that cert plugin help is not available" |