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

Martin Basti mbasti at redhat.com
Wed Jul 29 13:27:16 UTC 2015


On 27/07/15 16:47, Lenka Doudova wrote:
> Hi,
>
> I'm attaching a patch with automated tests for stageuser plugin 
> (https://fedorahosted.org/freeipa/ticket/3813). The user plugin test 
> is affected as well (one class was added).
> The tests seem a bit of a mess even to myself, but what with the way 
> freeipa behaves I didn't know how else to implement them, but I'm 
> eager to learn how to do it in a nicer way, if someone has a better idea.
>
> Lenka
>
>
>
>
I just applied patches:

1) Please remove whitespace errors
$ git am freeipa-lryznaro-0002-Automated-test-for-stageuser-plugin.patch
Applying: Automated test for stageuser plugin
/home/mbasti/work/freeipa-devel/.git/rebase-apply/patch:110: trailing 
whitespace.
     """ Tracker class for staged user LDAP object
/home/mbasti/work/freeipa-devel/.git/rebase-apply/patch:113: trailing 
whitespace.
         StageUserTracker object stores information about the user.
/home/mbasti/work/freeipa-devel/.git/rebase-apply/patch:121: trailing 
whitespace.
         u'krbprincipalexpiration', u'usercertificate', u'dn', 
u'has_keytab', u'has_password',
/home/mbasti/work/freeipa-devel/.git/rebase-apply/patch:122: trailing 
whitespace.
         u'street', u'postalcode', u'facsimiletelephonenumber', 
u'carlicense',
/home/mbasti/work/freeipa-devel/.git/rebase-apply/patch:125: trailing 
whitespace.
         u'cn', u'ipauniqueid', u'objectclass', u'description',
warning: squelched 50 whitespace errors
warning: 55 lines add whitespace errors.

2)
Please use new shorter format of license header

3) can you fix some of the most serious PEP8 errors
$ git show -U0 | pep8 --diff | wc -l
198

4)
if options != None:

Please use "options *is not* None"

5)
For consistency it should be u'random'
if key == 'random':
                     self.attrs[u'randompassword'] = fuzzy_string

Otherwise it looks good
Martin^2

-- 
Martin Basti

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20150729/c2e900a3/attachment.htm>


More information about the Freeipa-devel mailing list