Esempio n. 1
0
def test__register_session_returns_none_if_no_response():
    driver = CIPDriver(CONNECT_PATH)
    driver._sock = Mocket()
    assert driver._register_session() is None
Esempio n. 2
0
def test__register_session_returns_configured_session(conf_session):
    driver = CIPDriver(CONNECT_PATH)
    driver._sock = Mocket(bytes(4) + UDINT.encode(conf_session) + bytes(20))
    assert conf_session == driver._register_session()