Skip to content

Commit

Permalink
NXDRIVE-2844: Nuxeo Drive transfer failed after removing hardware wor…
Browse files Browse the repository at this point in the history
…ked on pr comments 010
  • Loading branch information
gitofanindya committed Jul 27, 2023
1 parent 87932f7 commit e2b9df1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
17 changes: 9 additions & 8 deletions tests/unit/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,8 @@ def __exit__(self, exc_type, exc_val, exc_tb):
class MockEngine(Engine):
def __init__(self, tmp_path):
local_folder = tmp_path
version = 1

super().__init__(self, local_folder, version)
super().__init__(self, local_folder)


class MockedClient:
Expand Down Expand Up @@ -156,20 +155,22 @@ def manager_dao(tmp_path):
return dao


@pytest.fixture
def remote():
mocked_remote = MockedRemote()
return mocked_remote


@pytest.fixture()
def engine(engine_dao):
engine = MockEngine
engine.local_folder = os.path.expandvars("C:\\test\\%username%\\Drive")
engine.dao = engine_dao
engine.version = 1
engine.remote = remote()
return engine


@pytest.fixture
def remote():
mocked_remote = MockedRemote()
return mocked_remote


@pytest.fixture()
def manager(tmp_path):
manager = MockManager
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
from nxdrive.engine.processor import Processor


def test_synchronize_direct_transfer(engine, engine_dao, remote, tmp_path):
def test_synchronize_direct_transfer(engine, engine_dao, tmp_path):
engine = engine(tmp_path)
dao = engine_dao()
remote = remote
remote = engine.remote
Mocked_Session = namedtuple(
"session",
"status, uid",
Expand Down

0 comments on commit e2b9df1

Please sign in to comment.