|
41 | 41 | from cognite.client.data_classes.capabilities import Capability, LegacyCapability, UnknownAcl |
42 | 42 | from cognite.client.data_classes.data_modeling import TypedEdge, TypedEdgeApply, TypedNode, TypedNodeApply |
43 | 43 | from cognite.client.data_classes.data_modeling.data_types import ListablePropertyType |
| 44 | +from cognite.client.data_classes.data_modeling.ids import ContainerId, ViewId |
44 | 45 | from cognite.client.data_classes.data_modeling.query import NodeResultSetExpression, Query |
45 | 46 | from cognite.client.data_classes.datapoints import ( |
46 | 47 | _INT_AGGREGATES, |
|
69 | 70 | if TYPE_CHECKING: |
70 | 71 | import pandas |
71 | 72 |
|
| 73 | + |
72 | 74 | REPO_ROOT = Path(__file__).resolve().parent.parent |
73 | 75 |
|
74 | 76 | T_Type = TypeVar("T_Type", bound=type) |
@@ -530,7 +532,11 @@ def create_value(self, type_: Any, var_name: str | None = None) -> Any: |
530 | 532 | elif container_type is tuple: |
531 | 533 | if any(arg is ... for arg in args): |
532 | 534 | return tuple(self.create_value(first_not_none) for _ in range(self._random.randint(1, 3))) |
533 | | - raise NotImplementedError(f"Tuple with multiple types is not supported. {self._error_msg}") |
| 535 | + elif all(arg is str for arg in args): |
| 536 | + return tuple(self._random_string(self._random.randint(0, 10)) for _ in range(len(args))) |
| 537 | + raise NotImplementedError( |
| 538 | + f"Tuple with multiple types is not supported. Add on the above line. {self._error_msg}" |
| 539 | + ) |
534 | 540 |
|
535 | 541 | if var_name == "external_id" and type_ is str: |
536 | 542 | return self._random_string(50, sample_from=string.ascii_uppercase + string.digits) |
@@ -611,6 +617,8 @@ def _type_checking(cls) -> dict[str, type]: |
611 | 617 | from cognite.client import CogniteClient |
612 | 618 |
|
613 | 619 | return { |
| 620 | + "ContainerId": ContainerId, |
| 621 | + "ViewId": ViewId, |
614 | 622 | "CogniteClient": CogniteClient, |
615 | 623 | "NumpyDatetime64NSArray": npt.NDArray[np.datetime64], |
616 | 624 | "NumpyUInt32Array": npt.NDArray[np.uint32], |
|
0 commit comments