From a26cf0d7910dd4c0a4da08682b4be8d3d94ba520 Mon Sep 17 00:00:00 2001 From: Ben Lipton Date: Thu, 8 Sep 2016 18:29:46 -0400 Subject: tests: Add tests for CSR autogeneration This patch also contains some code changes to make the code easier to test and to make the tests pass. https://fedorahosted.org/freeipa/ticket/4899 Reviewed-By: Jan Cholasta --- ipaclient/plugins/csrgen.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ipaclient/plugins') diff --git a/ipaclient/plugins/csrgen.py b/ipaclient/plugins/csrgen.py index 0ad5fa1ff..0669a4775 100644 --- a/ipaclient/plugins/csrgen.py +++ b/ipaclient/plugins/csrgen.py @@ -96,11 +96,12 @@ class cert_get_requestdata(Local): raise errors.NotFound( reason=_("The principal for this request doesn't exist.")) principal_obj = principal_obj['result'] + config = api.Command.config_show()['result'] generator = CSRGenerator(FileRuleProvider()) script = generator.csr_script( - principal_obj, profile_id, helper) + principal_obj, config, profile_id, helper) result = {} if 'out' in options: -- cgit