Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check if key in self._object_class_keys #220

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

scottcarr
Copy link

It's possible for key to be either "objectClass" or b"objectClass". Other places use this self._object_class_keys to handle this scenario.

@@ -247,7 +247,7 @@ def toWire(self):
lst = list(self.items())
lst.sort()
for key, values in lst:
if key != "objectClass":
if key not in self._object_class_keys:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just above "objectClass" is handled explicitly too, does that need to use _object_class_keys ?

        objectClasses = list(self.get("objectClass", []))
        objectClasses.sort()
        a.append(("objectClass", objectClasses))

@codecov
Copy link

codecov bot commented Mar 1, 2021

Codecov Report

Merging #220 (b9cdd0a) into master (df81510) will not change coverage.
The diff coverage is 100.00%.

❗ Current head b9cdd0a differs from pull request most recent head 8e5a9e8. Consider uploading reports for the commit 8e5a9e8 to get more accurate results

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #220   +/-   ##
=======================================
  Coverage   83.28%   83.28%           
=======================================
  Files          87       87           
  Lines       11567    11567           
  Branches     1184     1184           
=======================================
  Hits         9634     9634           
  Misses       1815     1815           
  Partials      118      118           
Impacted Files Coverage Δ
ldaptor/protocols/ldap/ldapsyntax.py 94.24% <100.00%> (ø)
ldaptor/test/test_autofill_samba.py 100.00% <0.00%> (ø)
ldaptor/protocols/ldap/distinguishedname.py 89.09% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4bfe289...8e5a9e8. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants