From 91c050b4e093802d8c6b510a22d6e435faba965f Mon Sep 17 00:00:00 2001 From: Ganna Kaihorodova Date: Thu, 8 Dec 2016 15:08:41 +0100 Subject: [PATCH] User Tracker: Test to create user with minimal values Test to create user with minimal values, where uid is not specified https://fedorahosted.org/freeipa/ticket/6126 Reviewed-By: Stanislav Laznicka Reviewed-By: Milan Kubik Reviewed-By: Lenka Doudova --- ipatests/test_xmlrpc/test_user_plugin.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ipatests/test_xmlrpc/test_user_plugin.py b/ipatests/test_xmlrpc/test_user_plugin.py index c09d793b5..d33c4d776 100644 --- a/ipatests/test_xmlrpc/test_user_plugin.py +++ b/ipatests/test_xmlrpc/test_user_plugin.py @@ -78,6 +78,13 @@ expired_expiration_string = "1991-12-07T19:54:13Z" isodate_re = re.compile('^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$') +@pytest.fixture(scope='class') +def user_min(request): + """ User tracker fixture for testing user with uid no specified """ + tracker = UserTracker(givenname=u'Testmin', sn=u'Usermin') + return tracker.make_fixture(request) + + @pytest.fixture(scope='class') def user(request): tracker = UserTracker(name=u'user1', givenname=u'Test', sn=u'User1') @@ -405,6 +412,12 @@ class TestUpdate(XMLRPC_test): @pytest.mark.tier1 class TestCreate(XMLRPC_test): + def test_create_user_with_min_values(self, user_min): + """ Create user with uid not specified """ + user_min.ensure_missing() + command = user_min.make_create_command() + command() + def test_create_with_krb_ticket_policy(self): """ Try to create user with krbmaxticketlife set """ testuser = UserTracker(