|
34 | 34 | OAuthError, |
35 | 35 | ServerError, |
36 | 36 | TableAlreadyExistsError, |
| 37 | + NoSuchIdentifierError, |
37 | 38 | ) |
38 | 39 | from pyiceberg.io import load_file_io |
39 | 40 | from pyiceberg.partitioning import PartitionField, PartitionSpec |
@@ -1158,31 +1159,31 @@ def test_delete_table_404(rest_mock: Mocker) -> None: |
1158 | 1159 |
|
1159 | 1160 | def test_create_table_missing_namespace(rest_mock: Mocker, table_schema_simple: Schema) -> None: |
1160 | 1161 | table = "table" |
1161 | | - with pytest.raises(NoSuchTableError) as e: |
| 1162 | + with pytest.raises(NoSuchIdentifierError) as e: |
1162 | 1163 | # Missing namespace |
1163 | 1164 | RestCatalog("rest", uri=TEST_URI, token=TEST_TOKEN).create_table(table, table_schema_simple) |
1164 | 1165 | assert f"Missing namespace or invalid identifier: {table}" in str(e.value) |
1165 | 1166 |
|
1166 | 1167 |
|
1167 | 1168 | def test_load_table_invalid_namespace(rest_mock: Mocker) -> None: |
1168 | 1169 | table = "table" |
1169 | | - with pytest.raises(NoSuchTableError) as e: |
| 1170 | + with pytest.raises(NoSuchIdentifierError) as e: |
1170 | 1171 | # Missing namespace |
1171 | 1172 | RestCatalog("rest", uri=TEST_URI, token=TEST_TOKEN).load_table(table) |
1172 | 1173 | assert f"Missing namespace or invalid identifier: {table}" in str(e.value) |
1173 | 1174 |
|
1174 | 1175 |
|
1175 | 1176 | def test_drop_table_invalid_namespace(rest_mock: Mocker) -> None: |
1176 | 1177 | table = "table" |
1177 | | - with pytest.raises(NoSuchTableError) as e: |
| 1178 | + with pytest.raises(NoSuchIdentifierError) as e: |
1178 | 1179 | # Missing namespace |
1179 | 1180 | RestCatalog("rest", uri=TEST_URI, token=TEST_TOKEN).drop_table(table) |
1180 | 1181 | assert f"Missing namespace or invalid identifier: {table}" in str(e.value) |
1181 | 1182 |
|
1182 | 1183 |
|
1183 | 1184 | def test_purge_table_invalid_namespace(rest_mock: Mocker) -> None: |
1184 | 1185 | table = "table" |
1185 | | - with pytest.raises(NoSuchTableError) as e: |
| 1186 | + with pytest.raises(NoSuchIdentifierError) as e: |
1186 | 1187 | # Missing namespace |
1187 | 1188 | RestCatalog("rest", uri=TEST_URI, token=TEST_TOKEN).purge_table(table) |
1188 | 1189 | assert f"Missing namespace or invalid identifier: {table}" in str(e.value) |
|
0 commit comments