forked from p15670423/monkey
UT: Add a test for AgentConfiguration.from_dict()
This commit is contained in:
parent
5c739716a9
commit
8605fd40ac
|
@ -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_
|
||||
|
|
Loading…
Reference in New Issue