UT: Add a test for AgentConfiguration.from_dict()

This commit is contained in:
Mike Salvatore 2022-06-24 11:50:49 -04:00
parent 5c739716a9
commit 8605fd40ac
1 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,5 @@
import json
from tests.common.example_agent_configuration import (
AGENT_CONFIGURATION,
BLOCKED_IPS,
@ -178,3 +180,12 @@ def test_default_agent_configuration():
config = schema.loads(DEFAULT_AGENT_CONFIGURATION_JSON)
assert isinstance(config, AgentConfiguration)
def test_from_dict():
schema = AgentConfigurationSchema()
dict_ = json.loads(DEFAULT_AGENT_CONFIGURATION_JSON)
config = AgentConfiguration.from_dict(dict_)
assert schema.dump(config) == dict_