def test_initialize_peripheral() -> None:
    manager = AtlasPHManager(
        name="Test",
        i2c_lock=threading.RLock(),
        state=State(),
        config=peripheral_config,
        simulate=True,
        mux_simulator=MuxSimulator(),
    )
    manager.initialize_peripheral()
Esempio n. 2
0
def test_clear_calibration() -> None:
    manager = AtlasPHManager(
        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()