[Freeipa-devel] [PATCH 0002] TEST: Stageuser plugin

Lenka Doudova ldoudova at redhat.com
Fri Aug 14 16:32:32 UTC 2015


Yes, that is "correct" - it's malfunctioning behavior of the plugin - 
command 'stageuser-add --from-delete', which is discussed in another 
thread. I left this test case for so long as it's not fixed/changed. If 
the command remains and is fixed, the test case will be valid, if it's 
changed I'll fix the test case to reflect the new command.

Lenka

On 08/14/2015 05:39 PM, Martin Basti wrote:
>
>
> On 08/14/2015 11:04 AM, Lenka Doudova wrote:
>>> NACK
>>>
>>> syntax error, missing ')'
>>> -from ipatests.util import assert_equal, assert_not_equal, raises
>>> +from ipatests.util import (
>>> +    assert_equal, assert_not_equal, raises, assert_deepequal
>>>
>>> I cannot apply this patch, please check it
>>
>> Sorry for the error, corrected patch attached.
>> I also added two testcases that Thierry proposed, and changed names 
>> of few methods (original ones were confusing).
>>
>> Lenka
> I got this error
>
> ==================================================================================================== 
> FAILURES 
> =====================================================================================================
> ____________________________________________________________________________________ 
> TestPreserved.test_staged_from_preserved 
> _____________________________________________________________________________________
>
> self = <ipatests.test_xmlrpc.test_stageuser_plugin.TestPreserved 
> object at 0x7ffb94811350>, user = 
> <ipatests.test_xmlrpc.test_user_plugin.UserTracker object at 
> 0x7ffb949e7190>
> stageduser = 
> <ipatests.test_xmlrpc.test_stageuser_plugin.StageUserTracker object at 
> 0x7ffb94811c50>
>
>     def test_staged_from_preserved(self, user, stageduser):
>         user.make_preserved_user()
>
>         stageduser.ensure_missing()
>         stageduser = StageUserTracker(user.uid, user.givenname, user.sn)
>         stageduser.create_from_preserved(user)
> >       command = user.make_create_command(from_delete=True)
> E       TypeError: make_create_command() got an unexpected keyword 
> argument 'from_delete'
>
> test_xmlrpc/test_stageuser_plugin.py:718: TypeError
> ---------------------------------------------------------------------------------------------- 
> Captured stdout setup 
> ----------------------------------------------------------------------------------------------
> Ran command: ipalib.plugins.stageuser.stageuser_del()(u'suser1', 
> version=u'2.148'): NotFound: suser1: stage user not found
> ---------------------------------------------------------------------------------------------- 
> Captured stdout call 
> -----------------------------------------------------------------------------------------------
> Ran command: ipalib.plugins.user.user_add()(u'auser1', 
> givenname=u'active', sn=u'user', version=u'2.148'): OK
> Ran command: ipalib.plugins.user.user_del()(u'auser1', preserve=True, 
> no_preserve=False, version=u'2.148'): OK
>
> Martin^2




More information about the Freeipa-devel mailing list