Skip to content

Commit 3bf2329

Browse files
committed
in this pr changed ?
1 parent 796c915 commit 3bf2329

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tests/test_serializers.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
# under the License.
1717

1818
import json
19-
import os
2019
import uuid
2120
from typing import Any
2221

@@ -28,6 +27,7 @@
2827
from pyiceberg.table.metadata import TableMetadataV1
2928
from pyiceberg.table.update import AssertRefSnapshotId, TableRequirement
3029
from pyiceberg.typedef import IcebergBaseModel
30+
from pyiceberg.utils.config import Config
3131

3232

3333
def test_legacy_current_snapshot_id(
@@ -41,7 +41,14 @@ def test_legacy_current_snapshot_id(
4141
static_table = StaticTable.from_metadata(metadata_location)
4242
assert static_table.metadata.current_snapshot_id is None
4343

44-
mocker.patch.dict(os.environ, values={"PYICEBERG_LEGACY_CURRENT_SNAPSHOT_ID": "True"})
44+
mocker.patch(
45+
"pyiceberg.serializers.Config",
46+
return_value=Config({"legacy-current-snapshot-id": "True"}),
47+
)
48+
mocker.patch(
49+
"pyiceberg.table.metadata.Config",
50+
return_value=Config({"legacy-current-snapshot-id": "True"}),
51+
)
4552

4653
ToOutputFile.table_metadata(metadata, PyArrowFileIO().new_output(location=metadata_location), overwrite=True)
4754
with PyArrowFileIO().new_input(location=metadata_location).open() as input_stream:

0 commit comments

Comments
 (0)