[Freeipa-devel] [PATCHES] 0025-26 Test improvements

Petr Viktorin pviktori at redhat.com
Tue Mar 27 08:23:30 UTC 2012


On 03/26/2012 10:44 PM, Rob Crittenden wrote:
> Petr Viktorin wrote:
>> Patch 25 fixes errors I found by running pylint on the testsuite. They
>> were in code that was unused, either by error or because it only runs on
>> errors.
>>
>> Patch 26 adds a test for the batch plugin.
>
> In patch 25 the second test_internal_error should really be
> test_unauthorized_error. I think that is a clearer name. Otherwise looks
> good.
>
> Patch 26 needs a very minor rebase to fix an error caused by improved
> error code handling:
>
> expected = Fuzzy(u"invalid 'gidnumber'.*", <type 'unicode'>, None)
> got = u"invalid 'gid': Gettext('must be an integer', domain='ipa',
> localedir=None)"
>
> I tested this:
>
> diff --git a/tests/test_xmlrpc/test_batch_plugin.py
> b/tests/test_xmlrpc/test_bat
> ch_plugin.py
> index e4280ed..d69bfd9 100644
> --- a/tests/test_xmlrpc/test_batch_plugin.py
> +++ b/tests/test_xmlrpc/test_batch_plugin.py
> @@ -186,7 +186,7 @@ class test_batch(Declarative):
> dict(error=u"'params' is required"),
> dict(error=u"'givenname' is required"),
> dict(error=u"'description' is required"),
> - dict(error=Fuzzy(u"invalid 'gidnumber'.*")),
> + dict(error=Fuzzy(u"invalid 'gid'.*")),
> ),
> ),
> ),
>
> rob

Thank you! Fixed, attaching updated patches.

-- 
Petr³
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0025-02-Fix-little-test-errors.patch
Type: text/x-patch
Size: 3560 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20120327/2d708487/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0026-02-Test-the-batch-plugin.patch
Type: text/x-patch
Size: 10184 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20120327/2d708487/attachment-0001.bin>


More information about the Freeipa-devel mailing list