updates to session.clear to clear out all configuration data as well, updated session.shutdown to use clear, updated tests to account for this
This commit is contained in:
parent
dc27fadb10
commit
5c12651e4e
5 changed files with 18 additions and 26 deletions
|
@ -120,10 +120,6 @@ def session(global_session):
|
|||
global_session.set_state(EventTypes.CONFIGURATION_STATE)
|
||||
yield global_session
|
||||
global_session.clear()
|
||||
global_session.location.reset()
|
||||
global_session.services.reset()
|
||||
global_session.mobility.config_reset()
|
||||
global_session.emane.config_reset()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
@ -133,11 +129,6 @@ def coretlv(module_coretlv):
|
|||
coreemu.sessions[session.id] = session
|
||||
yield module_coretlv
|
||||
coreemu.shutdown()
|
||||
session.clear()
|
||||
session.location.reset()
|
||||
session.services.reset()
|
||||
session.mobility.config_reset()
|
||||
session.emane.config_reset()
|
||||
|
||||
|
||||
def pytest_addoption(parser):
|
||||
|
|
|
@ -645,14 +645,9 @@ class TestGui:
|
|||
assert len(coretlv.session.nodes) == 1
|
||||
|
||||
def test_config_all(self, coretlv):
|
||||
node = coretlv.session.add_node()
|
||||
message = coreapi.CoreConfMessage.create(
|
||||
MessageFlags.ADD.value,
|
||||
[
|
||||
(ConfigTlvs.OBJECT, "all"),
|
||||
(ConfigTlvs.NODE, node.id),
|
||||
(ConfigTlvs.TYPE, ConfigFlags.RESET.value),
|
||||
],
|
||||
[(ConfigTlvs.OBJECT, "all"), (ConfigTlvs.TYPE, ConfigFlags.RESET.value)],
|
||||
)
|
||||
coretlv.session.location.refxyz = (10, 10, 10)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue