Exemple #1
0
def test_invalid_invalid_len():
    """Test for invalid cemi len."""
    frame = CEMIFrame()
    with pytest.raises(UnsupportedCEMIMessage, match=r".*CEMI too small.*"):
        frame.from_knx_data_link_layer(get_data(0x29, 0, 0, 0, 0, 2, 0, [])[:5])
Exemple #2
0
def test_invalid_tpci_apci(raw, err_msg):
    """Test for invalid APCIService."""
    frame = CEMIFrame()
    with pytest.raises(UnsupportedCEMIMessage, match=err_msg):
        frame.from_knx_data_link_layer(raw)
Exemple #3
0
def test_invalid_tpci_apci():
    """Test for invalid APCIService."""
    frame = CEMIFrame()
    with raises(UnsupportedCEMIMessage, match=r".*APCI not supported: .*"):
        frame.from_knx_data_link_layer(get_data(0x29, 0, 0, 0, 0, 1, 0xFFC0, []))