Fix wrong use of identity operation

Strings should not be compared with the identity operation 'is' or
'is not'.

Fixes: https://pagure.io/freeipa/issue/8057
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
This commit is contained in:
Christian Heimes
2019-09-03 13:55:27 +02:00
committed by Florence Blanc-Renaud
parent 8d2125f654
commit 0fc4b8c25c
5 changed files with 7 additions and 7 deletions

View File

@@ -233,7 +233,7 @@ class test_LDAPEntry:
e = self.entry
assert e.pop('cn') == self.cn1
assert 'cn' not in e
assert e.pop('cn', 'default') is 'default'
assert e.pop('cn', 'default') == 'default'
with pytest.raises(KeyError):
e.pop('cn')