Common: Move transforms from monkey_island to common

This commit is contained in:
Mike Salvatore 2022-08-22 12:33:36 -04:00
parent fc14a1f573
commit 0607f36404
5 changed files with 5 additions and 7 deletions

View File

@ -1,7 +1,9 @@
"""
Used for a common things between agent and island
"""
from . import transforms
from .di_container import DIContainer, UnresolvableDependencyError
from .operating_system import OperatingSystem
from . import types
from . import base_models
from .agent_registration_message import AgentRegistrationMessage

View File

@ -5,10 +5,9 @@ from pydantic import Field, PositiveInt, validator
from common import OperatingSystem
from common.base_models import MutableBaseModel
from common.transforms import make_immutable_sequence
from common.types import HardwareID
from .transforms import make_immutable_sequence
MachineID = PositiveInt

View File

@ -3,9 +3,9 @@ from typing import Sequence, Tuple
from pydantic import Field, validator
from common.base_models import MutableBaseModel
from common.transforms import make_immutable_nested_sequence
from . import CommunicationType, MachineID
from .transforms import make_immutable_nested_sequence
ConnectionsSequence = Sequence[Tuple[MachineID, Sequence[CommunicationType]]]

View File

@ -3,10 +3,7 @@ from typing import MutableSequence, Sequence
import pytest
from monkey_island.cc.models.transforms import (
make_immutable_nested_sequence,
make_immutable_sequence,
)
from common.transforms import make_immutable_nested_sequence, make_immutable_sequence
def test_make_immutable_sequence__list():