|
64 | 64 | from PowerPlatform.Dataverse.operations.query import QueryOperations |
65 | 65 | from PowerPlatform.Dataverse.operations.tables import TableOperations |
66 | 66 |
|
67 | | -try: |
68 | | - from PowerPlatform.Dataverse.operations.files import FileOperations |
69 | | -except ImportError: |
70 | | - FileOperations = None # type: ignore[assignment,misc] |
71 | | - |
72 | 67 |
|
73 | 68 | def validate_imports(): |
74 | 69 | """Validate that all key imports work correctly.""" |
@@ -128,35 +123,18 @@ def validate_client_methods(DataverseClient): |
128 | 123 | print("\nValidating Client Methods...") |
129 | 124 | print("-" * 50) |
130 | 125 |
|
131 | | - # Validate namespace API: client.records, client.query, client.tables, client.files |
| 126 | + # Validate namespace API: client.records, client.query, client.tables |
132 | 127 | expected_namespaces = { |
133 | | - "records": ["create", "get", "update", "delete", "upsert"], |
134 | | - "query": ["sql"], |
135 | | - "tables": [ |
136 | | - "create", |
137 | | - "get", |
138 | | - "list", |
139 | | - "delete", |
140 | | - "add_columns", |
141 | | - "remove_columns", |
142 | | - "create_one_to_many_relationship", |
143 | | - "create_many_to_many_relationship", |
144 | | - "delete_relationship", |
145 | | - "get_relationship", |
146 | | - "create_lookup_field", |
147 | | - ], |
| 128 | + "records": ["create", "get", "update", "delete"], |
| 129 | + "query": ["get", "sql"], |
| 130 | + "tables": ["create", "get", "list", "delete", "add_columns", "remove_columns"], |
148 | 131 | } |
149 | 132 |
|
150 | | - if FileOperations is not None: |
151 | | - expected_namespaces["files"] = ["upload"] |
152 | | - |
153 | 133 | ns_classes = { |
154 | 134 | "records": RecordOperations, |
155 | 135 | "query": QueryOperations, |
156 | 136 | "tables": TableOperations, |
157 | 137 | } |
158 | | - if FileOperations is not None: |
159 | | - ns_classes["files"] = FileOperations |
160 | 138 |
|
161 | 139 | missing_methods = [] |
162 | 140 | for ns, methods in expected_namespaces.items(): |
|
0 commit comments