|
32 | 32 | NoSuchTableError,
|
33 | 33 | OAuthError,
|
34 | 34 | TableAlreadyExistsError,
|
| 35 | + NoSuchIdentifierError, |
35 | 36 | )
|
36 | 37 | from pyiceberg.io import load_file_io
|
37 | 38 | from pyiceberg.partitioning import PartitionField, PartitionSpec
|
@@ -1079,31 +1080,31 @@ def test_delete_table_404(rest_mock: Mocker) -> None:
|
1079 | 1080 |
|
1080 | 1081 | def test_create_table_missing_namespace(rest_mock: Mocker, table_schema_simple: Schema) -> None:
|
1081 | 1082 | table = "table"
|
1082 |
| - with pytest.raises(NoSuchTableError) as e: |
| 1083 | + with pytest.raises(NoSuchIdentifierError) as e: |
1083 | 1084 | # Missing namespace
|
1084 | 1085 | RestCatalog("rest", uri=TEST_URI, token=TEST_TOKEN).create_table(table, table_schema_simple)
|
1085 | 1086 | assert f"Missing namespace or invalid identifier: {table}" in str(e.value)
|
1086 | 1087 |
|
1087 | 1088 |
|
1088 | 1089 | def test_load_table_invalid_namespace(rest_mock: Mocker) -> None:
|
1089 | 1090 | table = "table"
|
1090 |
| - with pytest.raises(NoSuchTableError) as e: |
| 1091 | + with pytest.raises(NoSuchIdentifierError) as e: |
1091 | 1092 | # Missing namespace
|
1092 | 1093 | RestCatalog("rest", uri=TEST_URI, token=TEST_TOKEN).load_table(table)
|
1093 | 1094 | assert f"Missing namespace or invalid identifier: {table}" in str(e.value)
|
1094 | 1095 |
|
1095 | 1096 |
|
1096 | 1097 | def test_drop_table_invalid_namespace(rest_mock: Mocker) -> None:
|
1097 | 1098 | table = "table"
|
1098 |
| - with pytest.raises(NoSuchTableError) as e: |
| 1099 | + with pytest.raises(NoSuchIdentifierError) as e: |
1099 | 1100 | # Missing namespace
|
1100 | 1101 | RestCatalog("rest", uri=TEST_URI, token=TEST_TOKEN).drop_table(table)
|
1101 | 1102 | assert f"Missing namespace or invalid identifier: {table}" in str(e.value)
|
1102 | 1103 |
|
1103 | 1104 |
|
1104 | 1105 | def test_purge_table_invalid_namespace(rest_mock: Mocker) -> None:
|
1105 | 1106 | table = "table"
|
1106 |
| - with pytest.raises(NoSuchTableError) as e: |
| 1107 | + with pytest.raises(NoSuchIdentifierError) as e: |
1107 | 1108 | # Missing namespace
|
1108 | 1109 | RestCatalog("rest", uri=TEST_URI, token=TEST_TOKEN).purge_table(table)
|
1109 | 1110 | assert f"Missing namespace or invalid identifier: {table}" in str(e.value)
|
|
0 commit comments