|
16 | 16 | ExecutionResultCSV, |
17 | 17 | ExecutionState, |
18 | 18 | ExecutionStatusResponse, |
19 | | - ListTablesResponse, |
20 | 19 | ResultMetadata, |
21 | 20 | ResultsResponse, |
22 | | - TableInfo, |
23 | 21 | TimeData, |
24 | 22 | UsageResponse, |
25 | 23 | ) |
@@ -351,58 +349,6 @@ def test_usage_response_parsing_with_missing_fields(self): |
351 | 349 | assert result.private_dashboards == 0 |
352 | 350 | assert result.private_queries == 0 |
353 | 351 |
|
354 | | - def test_table_info_parsing(self): |
355 | | - """Test TableInfo parsing from API response""" |
356 | | - response_data = { |
357 | | - "full_name": "dune.my_namespace.my_table", |
358 | | - "created_at": "2024-01-15T10:30:00Z", |
359 | | - "is_private": True, |
360 | | - "table_size_bytes": "1024", |
361 | | - "updated_at": "2024-01-16T10:30:00Z", |
362 | | - } |
363 | | - result = TableInfo.from_dict(response_data) |
364 | | - assert result.full_name == "dune.my_namespace.my_table" |
365 | | - assert result.namespace == "my_namespace" |
366 | | - assert result.table_name == "my_table" |
367 | | - assert result.created_at == "2024-01-15T10:30:00Z" |
368 | | - assert result.is_private is True |
369 | | - assert result.table_size_bytes == "1024" |
370 | | - assert result.updated_at == "2024-01-16T10:30:00Z" |
371 | | - |
372 | | - def test_list_tables_response_parsing(self): |
373 | | - """Test ListTablesResponse parsing from API response""" |
374 | | - response_data = { |
375 | | - "tables": [ |
376 | | - { |
377 | | - "full_name": "dune.namespace1.table1", |
378 | | - "created_at": "2024-01-15T10:30:00Z", |
379 | | - "is_private": False, |
380 | | - }, |
381 | | - { |
382 | | - "full_name": "dune.namespace2.table2", |
383 | | - "created_at": "2024-01-16T11:30:00Z", |
384 | | - "is_private": True, |
385 | | - }, |
386 | | - ], |
387 | | - "next_offset": 100, |
388 | | - } |
389 | | - result = ListTablesResponse.from_dict(response_data) |
390 | | - assert len(result.tables) == 2 |
391 | | - assert result.tables[0].full_name == "dune.namespace1.table1" |
392 | | - assert result.tables[0].namespace == "namespace1" |
393 | | - assert result.tables[0].table_name == "table1" |
394 | | - assert result.tables[1].full_name == "dune.namespace2.table2" |
395 | | - assert result.tables[1].namespace == "namespace2" |
396 | | - assert result.tables[1].table_name == "table2" |
397 | | - assert result.next_offset == 100 |
398 | | - |
399 | | - def test_list_tables_response_parsing_empty(self): |
400 | | - """Test ListTablesResponse parsing with no tables""" |
401 | | - response_data = {"tables": [], "next_offset": None} |
402 | | - result = ListTablesResponse.from_dict(response_data) |
403 | | - assert len(result.tables) == 0 |
404 | | - assert result.next_offset is None |
405 | | - |
406 | 352 |
|
407 | 353 | if __name__ == "__main__": |
408 | 354 | unittest.main() |
0 commit comments