diff --git a/dune_client/api/table.py b/dune_client/api/table.py index dbe324e..2562cf7 100644 --- a/dune_client/api/table.py +++ b/dune_client/api/table.py @@ -7,7 +7,7 @@ from typing import List, Dict, IO from dune_client.api.base import BaseRouter -from dune_client.models import DuneError, InsertTableResult, CreateTableResponse +from dune_client.models import DuneError, InsertTableResult, CreateTableResult class TableAPI(BaseRouter): @@ -54,7 +54,7 @@ def create_table( schema: List[Dict[str, str]], description: str = "", is_private: bool = False, - ) -> CreateTableResponse: + ) -> CreateTableResult: """ https://docs.dune.com/api-reference/tables/endpoint/create The create table endpoint allows you to create an empty table @@ -76,7 +76,7 @@ def create_table( }, ) - return CreateTableResponse.from_dict(result_json) + return CreateTableResult.from_dict(result_json) def insert_table( self, diff --git a/dune_client/models.py b/dune_client/models.py index 7b5161d..3c05ae8 100644 --- a/dune_client/models.py +++ b/dune_client/models.py @@ -357,7 +357,7 @@ def __add__(self, other: ResultsResponse) -> ResultsResponse: @dataclass -class CreateTableResponse(DataClassJsonMixin): +class CreateTableResult(DataClassJsonMixin): """ Data type returned by table/create operation """ diff --git a/tests/e2e/test_client.py b/tests/e2e/test_client.py index c71d3ad..a936a3a 100644 --- a/tests/e2e/test_client.py +++ b/tests/e2e/test_client.py @@ -12,7 +12,7 @@ ExecutionStatusResponse, DuneError, InsertTableResult, - CreateTableResponse, + CreateTableResult, ) from dune_client.types import QueryParameter from dune_client.client import DuneClient @@ -127,7 +127,7 @@ def test_parameters_recognized(self): { "text_field": "different word", "number_field": 22, - "date_field": "1991-01-01T00:00:00Z", + "date_field": "1991-01-01 00:00:000", "list_field": "Option 2", } ], @@ -258,7 +258,7 @@ def test_create_table_success(self): ], is_private=False, ), - CreateTableResponse.from_dict( + CreateTableResult.from_dict( { "namespace": namespace, "table_name": table_name, @@ -354,7 +354,7 @@ def test_download_csv_success_by_id(self): { "text_field": "different word", "number_field": 22, - "date_field": "1991-01-01T00:00:00Z", + "date_field": "1991-01-01 00:00:00.000", "list_field": "Option 2", } ], @@ -376,7 +376,7 @@ def test_download_csv_success_with_params(self): pandas.read_csv(result_csv.data).to_dict(orient="records"), [ { - "date_field": "2022-05-04T00:00:00Z", + "date_field": "2022-05-04 00:00:00.000", "list_field": "Option 1", "number_field": 3.1415926535, "text_field": "Plain Text",