Skip to content

Commit

Permalink
fix: Use a class name that matches the distinguished name
Browse files Browse the repository at this point in the history
  • Loading branch information
ecederstrand committed Jun 5, 2024
1 parent bc988fa commit 2831454
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions exchangelib/folders/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
CalendarLogging,
CalendarSearchCache,
CommonViews,
Companies,
CompanyContacts,
Conflicts,
Contacts,
ConversationHistory,
Expand Down Expand Up @@ -139,7 +139,7 @@
"CalendarLogging",
"CalendarSearchCache",
"CommonViews",
"Companies",
"CompanyContacts",
"Conflicts",
"Contacts",
"ConversationHistory",
Expand Down
4 changes: 2 additions & 2 deletions exchangelib/folders/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def folder_cls_from_container_class(container_class):
from .known_folders import (
ApplicationData,
Calendar,
Companies,
CompanyContacts,
Contacts,
ConversationSettings,
CrawlerData,
Expand All @@ -270,7 +270,7 @@ def folder_cls_from_container_class(container_class):
for folder_cls in (
ApplicationData,
Calendar,
Companies,
CompanyContacts,
Contacts,
ConversationSettings,
CrawlerData,
Expand Down
4 changes: 2 additions & 2 deletions exchangelib/folders/known_folders.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def view(self, *args, **kwargs):
return FolderCollection(account=self.account, folders=[self]).view(*args, **kwargs)


class Companies(WellknownFolder):
class CompanyContacts(WellknownFolder):
DISTINGUISHED_FOLDER_ID = "companycontacts"
CONTAINER_CLASS = "IPF.Contact.Company"
supported_item_models = CONTACT_ITEM_CLASSES
Expand Down Expand Up @@ -762,7 +762,7 @@ class WorkingSet(NonDeletableFolder):
AllItems,
AllPersonMetadata,
Calendar,
Companies,
CompanyContacts,
Conflicts,
Contacts,
ConversationHistory,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_folder.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
Calendar,
CalendarSearchCache,
CommonViews,
Companies,
CompanyContacts,
Contacts,
ConversationSettings,
CrawlerData,
Expand Down Expand Up @@ -553,7 +553,7 @@ def test_folder_grouping(self):
self.assertEqual(f.folder_class, "IPF.StoreItem.Signal")
elif isinstance(f, PdpProfileV2Secured):
self.assertEqual(f.folder_class, "IPF.StoreItem.PdpProfileSecured")
elif isinstance(f, Companies):
elif isinstance(f, CompanyContacts):
self.assertEqual(f.folder_class, "IPF.Contact.Company")
elif isinstance(f, OrganizationalContacts):
self.assertEqual(f.folder_class, "IPF.Contact.OrganizationalContacts")
Expand Down

0 comments on commit 2831454

Please sign in to comment.