forked from p15670423/monkey
Island: Rename set_configuration() -> store_configuration()
This commit is contained in:
parent
bdce5f84a6
commit
73ead3bb26
|
@ -17,7 +17,7 @@ class FileAgentConfigurationRepository(IAgentConfigurationRepository):
|
||||||
|
|
||||||
return self._schema.loads(configuration_json)
|
return self._schema.loads(configuration_json)
|
||||||
|
|
||||||
def set_configuration(self, agent_configuration: AgentConfiguration):
|
def store_configuration(self, agent_configuration: AgentConfiguration):
|
||||||
configuration_json = self._schema.dumps(agent_configuration)
|
configuration_json = self._schema.dumps(agent_configuration)
|
||||||
|
|
||||||
self._file_repository.save_file(
|
self._file_repository.save_file(
|
||||||
|
|
|
@ -18,7 +18,7 @@ class IAgentConfigurationRepository(ABC):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def set_configuration(self, agent_configuration: AgentConfiguration):
|
def store_configuration(self, agent_configuration: AgentConfiguration):
|
||||||
"""
|
"""
|
||||||
Store the agent configuration in the repository
|
Store the agent configuration in the repository
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ def test_store_agent_config():
|
||||||
schema = AgentConfigurationSchema()
|
schema = AgentConfigurationSchema()
|
||||||
agent_configuration = schema.load(AGENT_CONFIGURATION)
|
agent_configuration = schema.load(AGENT_CONFIGURATION)
|
||||||
|
|
||||||
repository.set_configuration(agent_configuration)
|
repository.store_configuration(agent_configuration)
|
||||||
retrieved_agent_configuration = repository.get_configuration()
|
retrieved_agent_configuration = repository.get_configuration()
|
||||||
|
|
||||||
assert retrieved_agent_configuration == agent_configuration
|
assert retrieved_agent_configuration == agent_configuration
|
||||||
|
|
Loading…
Reference in New Issue