On 10/21/2015 07:19 PM, Michal Židek wrote:
On 10/21/2015 06:40 PM, Pavel Reichl wrote:
>
>
> On 10/21/2015 06:28 PM, Michal Židek wrote:
>> +
>> +def test_wrong_LC_ALL(local_domain_only):
>> + """
>> + Regression test for ticket
>> +https://fedorahosted.org/sssd/ticket/2785
>> +
>> + """
>> + subprocess.call(["sss_useradd", "foo", "-M"])
>> + pwd.getpwnam("foo")
>> +
>> + # Change the LC_ALL variable to nonexistent locale
>> + oldvalue = os.environ.get("LC_ALL", "")
>> + os.environ["LC_ALL"] = "nonexistent_locale"
>> +
>> + # sss_userdel must remove the user despite wrong LC_ALL
>> + ret = subprocess.call(["sss_userdel", "foo",
"-R"])
>
> Please check ret value or use check_call method. Thanks!
>
>> + assert_nonexistent_user("foo")
>> + os.environ["LC_LOCAL"] = oldvalue
>> -- 2.1.0
>
> Please run pep8, I think I saw missing line and missing space after #.
>
> I haven't tested patches I just noticed this nitpicks.
>
> Thanks!
Thank you Pavel, I fixed the nitpicks and
checked the code with pep8.
New patches are attached.
Michal
New patches attached. I had unused constant
in the code,
Michal