mirror of
https://github.com/samschott/maestral.git
synced 2024-09-21 02:47:59 +03:00
adapt test imports
This commit is contained in:
parent
989163a07e
commit
d732eb2034
@ -8,8 +8,8 @@ import pytest
|
||||
from dropbox.files import WriteMode, FileMetadata
|
||||
|
||||
from maestral.main import Maestral
|
||||
from maestral.errors import NotFoundError, FileConflictError
|
||||
from maestral.client import convert_api_errors
|
||||
from maestral.exceptions import NotFoundError, FileConflictError
|
||||
from maestral.errorhandling import convert_api_errors
|
||||
from maestral.config import remove_configuration
|
||||
from maestral.utils.path import (
|
||||
generate_cc_name,
|
||||
|
@ -4,7 +4,7 @@ import pytest
|
||||
from dropbox.files import FolderMetadata
|
||||
from dropbox.sharing import SharedFolderMetadata
|
||||
|
||||
from maestral.errors import NotFoundError, PathError
|
||||
from maestral.exceptions import NotFoundError, PathError
|
||||
from maestral.utils.path import normalize
|
||||
|
||||
from .conftest import resources
|
||||
|
@ -7,13 +7,13 @@ import subprocess
|
||||
|
||||
import pytest
|
||||
|
||||
from maestral.errors import (
|
||||
from maestral.exceptions import (
|
||||
NotFoundError,
|
||||
UnsupportedFileTypeForDiff,
|
||||
SharedLinkError,
|
||||
SyncError,
|
||||
)
|
||||
from maestral.main import FileStatus, IDLE
|
||||
from maestral.constants import FileStatus, IDLE
|
||||
from maestral.utils.path import delete, normalize
|
||||
from maestral.utils.integration import get_inotify_limits
|
||||
|
||||
|
@ -9,7 +9,7 @@ import pytest
|
||||
from watchdog.utils.dirsnapshot import DirectorySnapshot
|
||||
from watchdog.events import FileCreatedEvent
|
||||
from dropbox.files import WriteMode
|
||||
from maestral.database import SyncEvent
|
||||
from maestral.models import SyncEvent
|
||||
from maestral.utils import sanitize_string
|
||||
from maestral.utils.appdirs import get_home_dir
|
||||
from maestral.utils.path import (
|
||||
@ -19,7 +19,7 @@ from maestral.utils.path import (
|
||||
normalize,
|
||||
fs_max_lengths_for_path,
|
||||
)
|
||||
from maestral.errors import PathError
|
||||
from maestral.exceptions import PathError
|
||||
|
||||
from .conftest import assert_synced, wait_for_idle, resources
|
||||
|
||||
|
@ -12,7 +12,7 @@ from dropbox.sharing import *
|
||||
from dropbox.auth import *
|
||||
from dropbox.common import *
|
||||
|
||||
from maestral.errors import (
|
||||
from maestral.exceptions import (
|
||||
MaestralApiError,
|
||||
InvalidDbidError,
|
||||
DropboxAuthError,
|
||||
@ -38,13 +38,13 @@ from maestral.errors import (
|
||||
FileConflictError,
|
||||
FolderConflictError,
|
||||
)
|
||||
from maestral.errors import PathRootError as MPRE
|
||||
from maestral.client import (
|
||||
from maestral.exceptions import PathRootError as MPRE
|
||||
from maestral.errorhandling import (
|
||||
os_to_maestral_error,
|
||||
dropbox_to_maestral_error,
|
||||
_get_lookup_error_msg,
|
||||
_get_write_error_msg,
|
||||
_get_session_lookup_error_msg,
|
||||
get_lookup_error_msg,
|
||||
get_write_error_msg,
|
||||
get_session_lookup_error_msg,
|
||||
)
|
||||
|
||||
|
||||
@ -83,7 +83,7 @@ def test_os_to_maestral_error(number, maestral_exc):
|
||||
],
|
||||
)
|
||||
def test_get_lookup_error_msg(error, maestral_exc):
|
||||
text, err_cls = _get_lookup_error_msg(error)
|
||||
text, err_cls = get_lookup_error_msg(error)
|
||||
assert err_cls is maestral_exc
|
||||
|
||||
|
||||
@ -102,7 +102,7 @@ def test_get_lookup_error_msg(error, maestral_exc):
|
||||
],
|
||||
)
|
||||
def test_get_write_error_msg(error, maestral_exc):
|
||||
text, err_cls = _get_write_error_msg(error)
|
||||
text, err_cls = get_write_error_msg(error)
|
||||
assert err_cls is maestral_exc
|
||||
|
||||
|
||||
@ -120,7 +120,7 @@ def test_get_write_error_msg(error, maestral_exc):
|
||||
],
|
||||
)
|
||||
def test_get_session_lookup_error_msg(error, maestral_exc):
|
||||
text, err_cls = _get_session_lookup_error_msg(error)
|
||||
text, err_cls = get_session_lookup_error_msg(error)
|
||||
assert err_cls is maestral_exc
|
||||
|
||||
|
||||
|
@ -18,7 +18,7 @@ from maestral.daemon import (
|
||||
Lock,
|
||||
)
|
||||
from maestral.main import Maestral
|
||||
from maestral.errors import NotLinkedError
|
||||
from maestral.exceptions import NotLinkedError
|
||||
|
||||
|
||||
# locking tests
|
||||
|
@ -3,7 +3,8 @@ from pathlib import Path
|
||||
|
||||
from watchdog.events import DirCreatedEvent, DirMovedEvent
|
||||
|
||||
from maestral.sync import SyncDirection, ItemType, ChangeType
|
||||
from maestral.sync import SyncDirection
|
||||
from maestral.models import ItemType, ChangeType
|
||||
from maestral.utils.path import move
|
||||
|
||||
|
||||
|
@ -5,7 +5,7 @@ import pytest
|
||||
from dropbox.users import FullAccount
|
||||
from dropbox.common import TeamRootInfo, UserRootInfo
|
||||
|
||||
from maestral.errors import NoDropboxDirError
|
||||
from maestral.exceptions import NoDropboxDirError
|
||||
from maestral.utils.appdirs import get_home_dir
|
||||
from maestral.utils.path import generate_cc_name, delete
|
||||
|
||||
|
@ -3,7 +3,7 @@ import builtins
|
||||
import pytest
|
||||
from requests.exceptions import RequestException
|
||||
|
||||
from maestral.errors import SyncError
|
||||
from maestral.exceptions import SyncError
|
||||
from maestral.utils.serializer import error_to_dict
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user