Skip to content

Commit

Permalink
NXDRIVE-2889: Display system notification for document review
Browse files Browse the repository at this point in the history
  • Loading branch information
swetayadav1 committed Apr 4, 2024
1 parent e0f2328 commit 27ccb5f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 19 deletions.
16 changes: 16 additions & 0 deletions tests/functional/test_manager.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import os
from unittest.mock import Mock

import pytest

from nxdrive.exceptions import NoAssociatedSoftware
from nxdrive.gui.application import Application

from ..markers import windows_only

Expand All @@ -29,6 +31,20 @@ def startfile(path):
manager.open_local_file("File.azerty")


def test_workflow(manager_factory):
manager, _ = manager_factory()
with manager:
manager.db_backup_worker = Mock()

manager.autolock_service = Mock()
manager.server_config_updater = Mock()
manager._create_server_config_updater = Mock()
manager.sync_and_quit_worker = Mock()
manager._create_db_backup_worker = Mock()
manager._create_workflow_worker = Mock()
Application(manager)


# This test is commented because it causes other ft tests to fails
# @Options.mock()
# def test_manager_init_failed_migrations(manager_factory, tmp_path, monkeypatch):
Expand Down
19 changes: 0 additions & 19 deletions tests/unit/test_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,22 +148,3 @@ def test_api_display_pending_task_with_exec(application, manager):
assert (
drive_api.display_pending_task("engine_uid", str(uuid4()), "/doc_path") is None
)


def test_init_workflow_with_app(tmp_path):
from nxdrive.manager import Manager

manager = Manager(tmp_path)
manager.db_backup_worker = Mock()

manager.autolock_service = Mock()
manager.server_config_updater = Mock()
manager._create_server_config_updater = Mock()
manager.sync_and_quit_worker = Mock()
manager._create_db_backup_worker = Mock()
manager._create_workflow_worker = Mock()

app = Application(manager)

app.init_workflow()
app.exit_app()

0 comments on commit 27ccb5f

Please sign in to comment.