summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2015-08-06 12:28:16 +0200
committerJakub Hrozek <jhrozek@redhat.com>2015-08-13 13:21:12 +0200
commit137d5dd0dba48f647e5f8b3976ddb78d65dc77a5 (patch)
tree21769fe6e3488294a5c2011b8fcb5a8dee2288e7
parent32c6db689a0206e062b799dfd32c34ba878ff044 (diff)
downloadsssd-137d5dd0dba48f647e5f8b3976ddb78d65dc77a5.tar.gz
sssd-137d5dd0dba48f647e5f8b3976ddb78d65dc77a5.tar.xz
sssd-137d5dd0dba48f647e5f8b3976ddb78d65dc77a5.zip
test_memory_cache: Fix few python issues
W:438,17: Unused variable 'gids' (unused-variable) W:438,10: Unused variable 'errno' (unused-variable) E:618,31: Undefined variable 'user' (undefined-variable) W:443,17: Unused variable 'gids' (unused-variable) W:443,10: Unused variable 'errno' (unused-variable) Reviewed-by: Michal Židek <mzidek@redhat.com>
-rw-r--r--src/tests/intg/test_memory_cache.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tests/intg/test_memory_cache.py b/src/tests/intg/test_memory_cache.py
index 1fd577e65..a33314771 100644
--- a/src/tests/intg/test_memory_cache.py
+++ b/src/tests/intg/test_memory_cache.py
@@ -435,14 +435,14 @@ def assert_stored_last_initgroups(user1_case1, user1_case2, user1_case_last,
stop_sssd()
user = user1_case1
- (res, errno, gids) = sssd_id.call_sssd_initgroups(user, primary_gid)
+ (res, errno, _) = sssd_id.call_sssd_initgroups(user, primary_gid)
assert res == sssd_id.NssReturnCode.UNAVAIL, \
- "Initgroups for user shoudl fail user %s, %d" % (user, res)
+ "Initgroups for user shoudl fail user %s, %d, %d" % (user, res, errno)
user = user1_case2
- (res, errno, gids) = sssd_id.call_sssd_initgroups(user, primary_gid)
+ (res, errno, _) = sssd_id.call_sssd_initgroups(user, primary_gid)
assert res == sssd_id.NssReturnCode.UNAVAIL, \
- "Initgroups for user shoudl fail user %s, %d" % (user, res)
+ "Initgroups for user shoudl fail user %s, %d, %d" % (user, res, errno)
# Just last invocation of initgroups shoudl PASS
# Otherwise, we would not be able to invalidate it
@@ -615,7 +615,7 @@ def assert_missing_mc_records_for_user1():
(res, err, _) = sssd_id.call_sssd_initgroups("user1", 2001)
assert res == sssd_id.NssReturnCode.UNAVAIL, \
"Initgroups should not find anything after invalidation of mc.\n" \
- "User %s, errno:%d" % (user, err)
+ "User user1, errno:%d" % err
def test_invalidate_user_before_stop(ldap_conn, sanity_rfc2307):