Example #1
0
def test_initialize_peripheral() -> None:
    manager = AtlasECManager(
        name="Test",
        i2c_lock=threading.RLock(),
        state=State(),
        config=peripheral_config,
        simulate=True,
        mux_simulator=MuxSimulator(),
    )
    manager.initialize_peripheral()
Example #2
0
def test_clear_calibrations() -> None:
    manager = AtlasECManager(
        name="Test",
        i2c_lock=threading.RLock(),
        state=State(),
        config=peripheral_config,
        simulate=True,
        mux_simulator=MuxSimulator(),
    )
    manager.initialize_peripheral()
    manager.mode = modes.CALIBRATE
    message, status = manager.create_event(
        request={"type": events.CLEAR_CALIBRATION})
    assert status == 200
    manager.check_events()