Exemple #1
0
def test_remove_model_when_exists():
    system = SimulatedSystem()
    battery = SinglePhaseGenerator()
    uuid = system.add_model(battery)
    assert system.remove_model(uuid)

    assert len(system.devices) == 0
    assert len(system.subscriptions) == 0
Exemple #2
0
def test_remove_model_when_no_devices():
    system = SimulatedSystem()
    assert system.remove_model(uuid.uuid1()) is False