forked from p15670423/monkey
UT: Rename InMemoryFileAgentConfigurationRepository to
InMemoryAgentConfigurationRepository
This commit is contained in:
parent
42c4803376
commit
1ae3bd4b4f
|
@ -1,4 +1,4 @@
|
|||
from .single_file_repository import SingleFileRepository
|
||||
from .mock_file_repository import MockFileRepository, FILE_CONTENTS, FILE_NAME
|
||||
from .open_error_file_repository import OpenErrorFileRepository
|
||||
from .in_memory_file_agent_configuration_repository import InMemoryFileAgentConfigurationRepository
|
||||
from .in_memory_agent_configuration_repository import InMemoryAgentConfigurationRepository
|
||||
|
|
|
@ -4,7 +4,7 @@ from common.configuration.agent_configuration import AgentConfigurationSchema
|
|||
from monkey_island.cc.repository import IAgentConfigurationRepository
|
||||
|
||||
|
||||
class InMemoryFileAgentConfigurationRepository(IAgentConfigurationRepository):
|
||||
class InMemoryAgentConfigurationRepository(IAgentConfigurationRepository):
|
||||
def __init__(self):
|
||||
self._configuration = AgentConfigurationSchema().load(AGENT_CONFIGURATION)
|
||||
|
|
@ -3,7 +3,7 @@ import json
|
|||
import pytest
|
||||
from tests.common import StubDIContainer
|
||||
from tests.common.example_agent_configuration import AGENT_CONFIGURATION
|
||||
from tests.monkey_island import InMemoryFileAgentConfigurationRepository
|
||||
from tests.monkey_island import InMemoryAgentConfigurationRepository
|
||||
from tests.unit_tests.monkey_island.conftest import get_url_for_resource
|
||||
|
||||
from monkey_island.cc.repository import IAgentConfigurationRepository
|
||||
|
@ -14,7 +14,7 @@ from monkey_island.cc.resources.agent_configuration import AgentConfiguration
|
|||
def flask_client(build_flask_client):
|
||||
container = StubDIContainer()
|
||||
|
||||
container.register(IAgentConfigurationRepository, InMemoryFileAgentConfigurationRepository)
|
||||
container.register(IAgentConfigurationRepository, InMemoryAgentConfigurationRepository)
|
||||
|
||||
with build_flask_client(container) as flask_client:
|
||||
yield flask_client
|
||||
|
|
Loading…
Reference in New Issue