Merge branch 'dev' into feature/1800_model-a-basic-router-subclass-of-node
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import json
|
||||
|
||||
from primaite.simulator.network.container import Network
|
||||
|
||||
|
||||
def test_creating_container():
|
||||
"""Check that we can create a network container"""
|
||||
net = Network()
|
||||
assert net.nodes == {}
|
||||
assert net.links == {}
|
||||
|
||||
|
||||
def test_describe_state():
|
||||
"""Check that we can describe network state without raising errors, and that the result is JSON serialisable."""
|
||||
net = Network()
|
||||
state = net.describe_state()
|
||||
json.dumps(state) # if this function call raises an error, the test fails, state was not JSON-serialisable
|
||||
Reference in New Issue
Block a user