fix import in tests
This commit is contained in:
parent
e6c07851d4
commit
309b266fe9
|
@ -1,28 +1,21 @@
|
||||||
import copy
|
|
||||||
import datetime
|
import datetime
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from colour import Color
|
from colour import Color
|
||||||
from ereuse_utils.naming import Naming
|
|
||||||
from ereuse_utils.test import ANY
|
|
||||||
from flask import g
|
from flask import g
|
||||||
from pytest import raises
|
|
||||||
from sqlalchemy.util import OrderedSet
|
from sqlalchemy.util import OrderedSet
|
||||||
|
|
||||||
from ereuse_devicehub.client import Client, UserClient
|
from ereuse_devicehub.client import Client, UserClient
|
||||||
from ereuse_devicehub.db import db
|
from ereuse_devicehub.db import db
|
||||||
from ereuse_devicehub.devicehub import Devicehub
|
from ereuse_devicehub.devicehub import Devicehub
|
||||||
|
from ereuse_devicehub.ereuse_utils.test import ANY
|
||||||
from ereuse_devicehub.resources.action import models as m
|
from ereuse_devicehub.resources.action import models as m
|
||||||
from ereuse_devicehub.resources.action.models import Remove, TestConnectivity
|
from ereuse_devicehub.resources.action.models import Remove, TestConnectivity
|
||||||
from ereuse_devicehub.resources.agent.models import Person
|
from ereuse_devicehub.resources.agent.models import Person
|
||||||
from ereuse_devicehub.resources.device import models as d
|
from ereuse_devicehub.resources.device import models as d
|
||||||
from ereuse_devicehub.resources.device.schemas import Device as DeviceS
|
from ereuse_devicehub.resources.device.schemas import Device as DeviceS
|
||||||
from ereuse_devicehub.resources.device.sync import (
|
from ereuse_devicehub.resources.device.sync import Sync
|
||||||
MismatchBetweenTags,
|
|
||||||
MismatchBetweenTagsAndHid,
|
|
||||||
Sync,
|
|
||||||
)
|
|
||||||
from ereuse_devicehub.resources.enums import (
|
from ereuse_devicehub.resources.enums import (
|
||||||
ComputerChassis,
|
ComputerChassis,
|
||||||
DisplayTech,
|
DisplayTech,
|
||||||
|
@ -32,10 +25,9 @@ from ereuse_devicehub.resources.enums import (
|
||||||
)
|
)
|
||||||
from ereuse_devicehub.resources.tag.model import Tag
|
from ereuse_devicehub.resources.tag.model import Tag
|
||||||
from ereuse_devicehub.resources.user import User
|
from ereuse_devicehub.resources.user import User
|
||||||
from ereuse_devicehub.teal.db import ResourceNotFound
|
|
||||||
from ereuse_devicehub.teal.enums import Layouts
|
from ereuse_devicehub.teal.enums import Layouts
|
||||||
from tests import conftest
|
from tests import conftest
|
||||||
from tests.conftest import file, json_encode, yaml2json
|
from tests.conftest import file, yaml2json
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.mvp
|
@pytest.mark.mvp
|
||||||
|
|
|
@ -1,26 +1,22 @@
|
||||||
import csv
|
import csv
|
||||||
import hashlib
|
import hashlib
|
||||||
from datetime import datetime
|
|
||||||
from io import BytesIO, StringIO
|
from io import BytesIO, StringIO
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import teal.marshmallow
|
import teal.marshmallow
|
||||||
from ereuse_utils.test import ANY
|
|
||||||
from flask import url_for
|
|
||||||
from werkzeug.exceptions import Unauthorized
|
|
||||||
|
|
||||||
from ereuse_devicehub import auth
|
from ereuse_devicehub import auth
|
||||||
from ereuse_devicehub.client import Client, UserClient
|
from ereuse_devicehub.client import Client, UserClient
|
||||||
from ereuse_devicehub.db import db
|
from ereuse_devicehub.db import db
|
||||||
from ereuse_devicehub.devicehub import Devicehub
|
from ereuse_devicehub.devicehub import Devicehub
|
||||||
|
from ereuse_devicehub.ereuse_utils.test import ANY
|
||||||
from ereuse_devicehub.resources.action.models import Allocate, Live, Snapshot
|
from ereuse_devicehub.resources.action.models import Allocate, Live, Snapshot
|
||||||
from ereuse_devicehub.resources.device import models as d
|
from ereuse_devicehub.resources.device import models as d
|
||||||
from ereuse_devicehub.resources.documents import documents
|
from ereuse_devicehub.resources.documents import documents
|
||||||
from ereuse_devicehub.resources.enums import SessionType
|
from ereuse_devicehub.resources.enums import SessionType
|
||||||
from ereuse_devicehub.resources.hash_reports import ReportHash
|
from ereuse_devicehub.resources.hash_reports import ReportHash
|
||||||
from ereuse_devicehub.resources.lot.models import Lot
|
from ereuse_devicehub.resources.lot.models import Lot
|
||||||
from ereuse_devicehub.resources.tag.model import Tag
|
|
||||||
from ereuse_devicehub.resources.tradedocument.models import TradeDocument
|
from ereuse_devicehub.resources.tradedocument.models import TradeDocument
|
||||||
from ereuse_devicehub.resources.user.models import Session
|
from ereuse_devicehub.resources.user.models import Session
|
||||||
from tests import conftest
|
from tests import conftest
|
||||||
|
|
|
@ -10,19 +10,17 @@ from uuid import uuid4
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from boltons import urlutils
|
from boltons import urlutils
|
||||||
from ereuse_utils.test import ANY
|
|
||||||
from requests.exceptions import HTTPError
|
|
||||||
|
|
||||||
from ereuse_devicehub.client import Client, UserClient
|
from ereuse_devicehub.client import Client, UserClient
|
||||||
from ereuse_devicehub.db import db
|
from ereuse_devicehub.db import db
|
||||||
from ereuse_devicehub.devicehub import Devicehub
|
from ereuse_devicehub.devicehub import Devicehub
|
||||||
|
from ereuse_devicehub.ereuse_utils.test import ANY
|
||||||
from ereuse_devicehub.parser.models import SnapshotsLog
|
from ereuse_devicehub.parser.models import SnapshotsLog
|
||||||
from ereuse_devicehub.resources.action.models import (
|
from ereuse_devicehub.resources.action.models import (
|
||||||
Action,
|
Action,
|
||||||
BenchmarkDataStorage,
|
BenchmarkDataStorage,
|
||||||
BenchmarkProcessor,
|
BenchmarkProcessor,
|
||||||
EraseSectors,
|
EraseSectors,
|
||||||
EreusePrice,
|
|
||||||
Ready,
|
Ready,
|
||||||
Snapshot,
|
Snapshot,
|
||||||
SnapshotRequest,
|
SnapshotRequest,
|
||||||
|
@ -30,17 +28,11 @@ from ereuse_devicehub.resources.action.models import (
|
||||||
)
|
)
|
||||||
from ereuse_devicehub.resources.action.views.snapshot import save_json
|
from ereuse_devicehub.resources.action.views.snapshot import save_json
|
||||||
from ereuse_devicehub.resources.device import models as m
|
from ereuse_devicehub.resources.device import models as m
|
||||||
from ereuse_devicehub.resources.device.exceptions import NeedsId
|
|
||||||
from ereuse_devicehub.resources.device.models import Device, SolidStateDrive
|
from ereuse_devicehub.resources.device.models import Device, SolidStateDrive
|
||||||
from ereuse_devicehub.resources.device.sync import (
|
|
||||||
MismatchBetweenProperties,
|
|
||||||
MismatchBetweenTagsAndHid,
|
|
||||||
)
|
|
||||||
from ereuse_devicehub.resources.documents import documents
|
from ereuse_devicehub.resources.documents import documents
|
||||||
from ereuse_devicehub.resources.enums import ComputerChassis, SnapshotSoftware
|
from ereuse_devicehub.resources.enums import ComputerChassis, SnapshotSoftware
|
||||||
from ereuse_devicehub.resources.tag import Tag
|
from ereuse_devicehub.resources.tag import Tag
|
||||||
from ereuse_devicehub.resources.user.models import User
|
from ereuse_devicehub.resources.user.models import User
|
||||||
from ereuse_devicehub.teal.db import DBError, UniqueViolation
|
|
||||||
from ereuse_devicehub.teal.marshmallow import ValidationError
|
from ereuse_devicehub.teal.marshmallow import ValidationError
|
||||||
from tests import conftest
|
from tests import conftest
|
||||||
from tests.conftest import file, file_json, json_encode, yaml2json
|
from tests.conftest import file, file_json, json_encode, yaml2json
|
||||||
|
|
|
@ -3,14 +3,13 @@ import pathlib
|
||||||
import pytest
|
import pytest
|
||||||
import requests_mock
|
import requests_mock
|
||||||
from boltons.urlutils import URL
|
from boltons.urlutils import URL
|
||||||
from ereuse_utils.session import DevicehubClient
|
|
||||||
from flask import g
|
from flask import g
|
||||||
from pytest import raises
|
from pytest import raises
|
||||||
|
|
||||||
from ereuse_devicehub.client import Client, UserClient
|
from ereuse_devicehub.client import Client, UserClient
|
||||||
from ereuse_devicehub.db import db
|
from ereuse_devicehub.db import db
|
||||||
from ereuse_devicehub.devicehub import Devicehub
|
from ereuse_devicehub.devicehub import Devicehub
|
||||||
from ereuse_devicehub.resources.action.models import Snapshot
|
from ereuse_devicehub.ereuse_utils.session import DevicehubClient
|
||||||
from ereuse_devicehub.resources.agent.models import Organization
|
from ereuse_devicehub.resources.agent.models import Organization
|
||||||
from ereuse_devicehub.resources.device.models import Desktop, Device
|
from ereuse_devicehub.resources.device.models import Desktop, Device
|
||||||
from ereuse_devicehub.resources.enums import ComputerChassis
|
from ereuse_devicehub.resources.enums import ComputerChassis
|
||||||
|
@ -29,7 +28,6 @@ from ereuse_devicehub.teal.db import (
|
||||||
)
|
)
|
||||||
from ereuse_devicehub.teal.marshmallow import ValidationError
|
from ereuse_devicehub.teal.marshmallow import ValidationError
|
||||||
from tests import conftest
|
from tests import conftest
|
||||||
from tests.conftest import json_encode, yaml2json
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.mvp
|
@pytest.mark.mvp
|
||||||
|
|
Reference in New Issue