Skip to content

Commit

Permalink
pylint: fix comparison-of-constants
Browse files Browse the repository at this point in the history
Related: https://pagure.io/freeipa/issue/9278

Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
  • Loading branch information
flo-renaud authored and stanislavlevin committed Dec 19, 2022
1 parent 58c92eb commit aa1bb7e
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions ipatests/test_cmdline/test_ipagetkeytab.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,8 @@ def test_use(self, test_smb_svc):
try:
conn.update_entry(entry)
except errors.ACIError:
assert ('No correct ACI to the allow ipaNTUserAttrs '
'for SMB service' in "failure")
assert False, ('No correct ACI to the allow ipaNTUserAttrs '
'for SMB service')

# Step 2. With ipaNTUserAttrs in place, we can ask to regenerate
# ipaNTHash value. We can also verify it is possible to write to
Expand All @@ -476,15 +476,14 @@ def test_use(self, test_smb_svc):
try:
conn.update_entry(entry)
except errors.ACIError:
assert ("No correct ACI to the ipaNTHash for SMB service"
in "failure")
assert False, "No correct ACI to the ipaNTHash for SMB service"
except errors.EmptyResult:
assert "No arcfour-hmac in Kerberos keys" in "failure"
assert False, "No arcfour-hmac in Kerberos keys"
except errors.DatabaseError:
# Most likely ipaNTHash already existed -- we either get
# OPERATIONS_ERROR or UNWILLING_TO_PERFORM, both map to
# the same DatabaseError class.
assert "LDAP Entry corruption after generation" in "failure"
assert False, "LDAP Entry corruption after generation"

# Update succeeded, now we have either MagicRegen (broken) or
# a real NT hash in the entry. However, we can only retrieve it as
Expand Down

0 comments on commit aa1bb7e

Please sign in to comment.