1414# KIND, either express or implied. See the License for the
1515# specific language governing permissions and limitations
1616# under the License.
17- from typing import Any , Dict , List
17+ from typing import List
18+ from unittest import mock
1819
1920import boto3
2021import pytest
2122from moto import mock_dynamodb
22- from unittest import mock
2323
2424from pyiceberg .catalog import METADATA_LOCATION , TABLE_TYPE
2525from pyiceberg .catalog .dynamodb import (
26+ ACTIVE ,
2627 DYNAMODB_COL_CREATED_AT ,
2728 DYNAMODB_COL_IDENTIFIER ,
2829 DYNAMODB_COL_NAMESPACE ,
2930 DYNAMODB_TABLE_NAME_DEFAULT ,
30- ACTIVE ,
3131 DynamoDbCatalog ,
3232 _add_property_prefix ,
3333)
@@ -57,6 +57,7 @@ def test_create_dynamodb_catalog_with_table_name(_dynamodb, _bucket_initialize:
5757 assert response ["Table" ]["TableName" ] == custom_table_name
5858 assert response ["Table" ]["TableStatus" ] == ACTIVE
5959
60+
6061@mock_dynamodb
6162def test_create_table_with_database_location (
6263 _bucket_initialize : None , moto_endpoint_url : str , table_schema_nested : Schema , database_name : str , table_name : str
@@ -510,6 +511,7 @@ def test_update_namespace_properties_overlap_update_removal(_bucket_initialize:
510511 # should not modify the properties
511512 assert test_catalog .load_namespace_properties (database_name ) == test_properties
512513
514+
513515def test_passing_provided_profile () -> None :
514516 catalog_name = "test_ddb_catalog"
515517 session_props = {
@@ -518,10 +520,10 @@ def test_passing_provided_profile() -> None:
518520 "aws_session_token" : "ghi" ,
519521 "region_name" : "eu-central-1" ,
520522 "botocore_session" : None ,
521- "profile_name" : None
523+ "profile_name" : None ,
522524 }
523525 props = {"py-io-impl" : "pyiceberg.io.fsspec.FsspecFileIO" }
524- props .update (session_props )
526+ props .update (session_props ) # type: ignore
525527 with mock .patch ('boto3.Session' , return_value = mock .Mock ()) as mock_session :
526528 mock_client = mock .Mock ()
527529 mock_session .return_value .client .return_value = mock_client
0 commit comments