Skip to content

Commit 2c49343

Browse files
committed
unit tests updates
1 parent 6003c48 commit 2c49343

32 files changed

+161
-58
lines changed

generator/metadata/Graph.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39582,6 +39582,12 @@ within the time frame of their original request."/>
3958239582
<Parameter Name="bindingParameter" Type="graph.driveItem"/>
3958339583
<Parameter Name="name" Type="Edm.String" Unicode="false"/>
3958439584
<Parameter Name="parentReference" Type="graph.itemReference"/>
39585+
<Parameter Name="childrenOnly" Type="Edm.Boolean">
39586+
<Annotation Term="Org.OData.Core.V1.OptionalParameter"/>
39587+
</Parameter>
39588+
<Parameter Name="includeAllVersionHistory" Type="Edm.Boolean">
39589+
<Annotation Term="Org.OData.Core.V1.OptionalParameter"/>
39590+
</Parameter>
3958539591
<ReturnType Type="graph.driveItem"/>
3958639592
</Action>
3958739593
<Action Name="move" IsBound="true" EntitySetPath="bindingParameter">

office365/copilot/root.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
1+
from office365.copilot.admin import CopilotAdmin
2+
from office365.runtime.paths.resource_path import ResourcePath
13
from office365.sharepoint.entity import Entity
24

35

46
class CopilotRoot(Entity):
57
"""A container for Microsoft 365 Copilot admin controls."""
8+
9+
@property
10+
def admin(self):
11+
"""The Microsoft 365 Copilot admin who can add or modify Copilot settings. Read-only. Nullable."""
12+
return self.properties.get(
13+
"admin",
14+
CopilotAdmin(self.context, ResourcePath("admin", self.resource_path)),
15+
)

office365/delta_collection.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
from typing import TYPE_CHECKING, Optional, Type, TypeVar
1+
from typing import TYPE_CHECKING, Optional, Type
22

33
from office365.delta_path import DeltaPath
44
from office365.entity import Entity
55
from office365.entity_collection import EntityCollection
6+
from office365.runtime.client_object import T
67
from office365.runtime.paths.resource_path import ResourcePath
78

8-
T = TypeVar("T")
9-
109
if TYPE_CHECKING:
1110
from office365.graph_client import GraphClient
1211

@@ -27,7 +26,7 @@ def change_type(self, type_name):
2726

2827
@property
2928
def delta(self):
30-
# type: () -> DeltaCollection[T]
29+
# type: () -> "DeltaCollection[T]"
3130
"""
3231
Get newly created, updated, or deleted entities (changes)
3332
"""
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from office365.entity import Entity
2+
3+
4+
class DelegatedAdminRelationship(Entity):
5+
"""Represents a delegated admin relationship between a partner and customer."""

office365/directory/users/user.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,7 @@ def created_datetime(self):
616616

617617
@property
618618
def created_objects(self):
619+
# type: () -> DirectoryObjectCollection
619620
"""Directory objects created by this user."""
620621
return self.properties.get(
621622
"createdObjects",
@@ -649,6 +650,7 @@ def age_group(self):
649650

650651
@property
651652
def app_role_assignments(self):
653+
# type: () -> AppRoleAssignmentCollection
652654
"""Get the apps and app roles which this user has been assigned."""
653655
return self.properties.get(
654656
"appRoleAssignments",

office365/intune/browser/__init__.py

Whitespace-only changes.

office365/onedrive/lists/collection.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from office365.entity_collection import EntityCollection
22
from office365.onedrive.lists.list import List
3+
from office365.onedrive.lists.template_type import ListTemplateType
34
from office365.runtime.paths.v4.entity import EntityPath
45
from office365.runtime.queries.create_entity import CreateEntityQuery
56

@@ -10,7 +11,7 @@ class ListCollection(EntityCollection[List]):
1011
def __init__(self, context, resource_path=None):
1112
super(ListCollection, self).__init__(context, List, resource_path)
1213

13-
def add(self, display_name, list_template="genericList"):
14+
def add(self, display_name, list_template=ListTemplateType.genericList):
1415
"""
1516
Create a new list.
1617

office365/runtime/client_object.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030

3131
T = TypeVar("T", bound="ClientObject")
32-
PropertyT = Union[bool, int, float, str, bytes, dict| ClientValue]
32+
PropertyT = Union[bool, int, float, str, bytes, dict | ClientValue]
3333

3434

3535
class ClientObject(object):
@@ -56,11 +56,6 @@ def clear_state(self):
5656
self._query_options = QueryOptions()
5757
return self
5858

59-
# @overload
60-
# def execute_query(self):
61-
# # type: () -> T
62-
# ...
63-
6459
def execute_query(self):
6560
# type: () -> Self
6661
"""Submit request(s) to the server."""
@@ -107,11 +102,6 @@ def after_execute(self, action, execute_first=False, include_response=False):
107102
self.context.after_query_execute(action, execute_first, include_response)
108103
return self
109104

110-
# @overload
111-
# def get(self):
112-
# # type: () -> T
113-
# ...
114-
115105
def get(self):
116106
# type: () -> Self
117107
"""Retrieves a client object from the server."""

office365/runtime/client_object_collection.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,11 @@ def paged(self, page_size=None, page_loaded=None):
145145
self.top(page_size)
146146
return self
147147

148+
# @overload
149+
# def get(self):
150+
# # type: () -> "ClientObjectCollection[T]"
151+
# ...
152+
148153
def get(self):
149154
# type: () -> Self
150155

0 commit comments

Comments
 (0)