|
33 | 33 | NoSuchTableError, |
34 | 34 | OAuthError, |
35 | 35 | TableAlreadyExistsError, |
| 36 | + NoSuchIdentifierError, |
36 | 37 | ) |
37 | 38 | from pyiceberg.io import load_file_io |
38 | 39 | from pyiceberg.partitioning import PartitionField, PartitionSpec |
@@ -1099,31 +1100,31 @@ def test_delete_table_404(rest_mock: Mocker) -> None: |
1099 | 1100 |
|
1100 | 1101 | def test_create_table_missing_namespace(rest_mock: Mocker, table_schema_simple: Schema) -> None: |
1101 | 1102 | table = "table" |
1102 | | - with pytest.raises(NoSuchTableError) as e: |
| 1103 | + with pytest.raises(NoSuchIdentifierError) as e: |
1103 | 1104 | # Missing namespace |
1104 | 1105 | RestCatalog("rest", uri=TEST_URI, token=TEST_TOKEN).create_table(table, table_schema_simple) |
1105 | 1106 | assert f"Missing namespace or invalid identifier: {table}" in str(e.value) |
1106 | 1107 |
|
1107 | 1108 |
|
1108 | 1109 | def test_load_table_invalid_namespace(rest_mock: Mocker) -> None: |
1109 | 1110 | table = "table" |
1110 | | - with pytest.raises(NoSuchTableError) as e: |
| 1111 | + with pytest.raises(NoSuchIdentifierError) as e: |
1111 | 1112 | # Missing namespace |
1112 | 1113 | RestCatalog("rest", uri=TEST_URI, token=TEST_TOKEN).load_table(table) |
1113 | 1114 | assert f"Missing namespace or invalid identifier: {table}" in str(e.value) |
1114 | 1115 |
|
1115 | 1116 |
|
1116 | 1117 | def test_drop_table_invalid_namespace(rest_mock: Mocker) -> None: |
1117 | 1118 | table = "table" |
1118 | | - with pytest.raises(NoSuchTableError) as e: |
| 1119 | + with pytest.raises(NoSuchIdentifierError) as e: |
1119 | 1120 | # Missing namespace |
1120 | 1121 | RestCatalog("rest", uri=TEST_URI, token=TEST_TOKEN).drop_table(table) |
1121 | 1122 | assert f"Missing namespace or invalid identifier: {table}" in str(e.value) |
1122 | 1123 |
|
1123 | 1124 |
|
1124 | 1125 | def test_purge_table_invalid_namespace(rest_mock: Mocker) -> None: |
1125 | 1126 | table = "table" |
1126 | | - with pytest.raises(NoSuchTableError) as e: |
| 1127 | + with pytest.raises(NoSuchIdentifierError) as e: |
1127 | 1128 | # Missing namespace |
1128 | 1129 | RestCatalog("rest", uri=TEST_URI, token=TEST_TOKEN).purge_table(table) |
1129 | 1130 | assert f"Missing namespace or invalid identifier: {table}" in str(e.value) |
|
0 commit comments