diff --git a/clients/python-wrapper/lakefs/import_manager.py b/clients/python-wrapper/lakefs/import_manager.py index b89f49189c2..5ee652891ce 100644 --- a/clients/python-wrapper/lakefs/import_manager.py +++ b/clients/python-wrapper/lakefs/import_manager.py @@ -60,7 +60,9 @@ def prefix(self, object_store_uri: str, destination: str) -> ImportManager: :param destination: The destination prefix relative to the branch :return: The ImportManager instance (self) after update, to allow operations chaining """ - self._append_source(lakefs_sdk.ImportLocation(type=_COMMON_PREFIX, path=object_store_uri, destination=destination)) + self._append_source(lakefs_sdk.ImportLocation(type=_COMMON_PREFIX, + path=object_store_uri, + destination=destination)) return self def object(self, object_store_uri: str, destination: str) -> ImportManager: diff --git a/clients/python-wrapper/tests/integration/test_import.py b/clients/python-wrapper/tests/integration/test_import.py index d09610f9dc7..ba66f442454 100644 --- a/clients/python-wrapper/tests/integration/test_import.py +++ b/clients/python-wrapper/tests/integration/test_import.py @@ -2,7 +2,7 @@ import pytest -from lakefs import Client +from lakefs.client import Client from lakefs.exceptions import ImportManagerException, ConflictException from tests.utests.common import expect_exception_context @@ -92,4 +92,4 @@ def test_import_manager_cancel(setup_repo): assert branch.commit_message() == expected_commit_message assert not status.completed assert "Canceled" in status.error.message - assert len(mgr.sources) == 0 + assert len(mgr.sources) == 1 diff --git a/clients/python-wrapper/tests/utests/test_import.py b/clients/python-wrapper/tests/utests/test_import.py index efbedc5824d..61530268485 100644 --- a/clients/python-wrapper/tests/utests/test_import.py +++ b/clients/python-wrapper/tests/utests/test_import.py @@ -49,6 +49,5 @@ def monkey_import_status(*_, **__): assert res.completed assert requests == 0 - # try again and expect error - with expect_exception_context(ImportManagerException): - mgr.wait() + # try again and expect no error + mgr.wait()