示例#1
0
def test_generate_group_bulletin():
    m = MessagePacket()
    m.source = "XX1XX-11"
    m.destination = "APRS"
    m.path = "TCPIP*,qAR,T2TEST"
    m.bulletin_id = 1
    m.group_bulletin_name = "TEST"
    m.message = "This is a test group bulletin"

    assert m.info == "BLN1TEST :This is a test group bulletin"
示例#2
0
def test_invalid_group_bulletin_name_value():
    m = MessagePacket()

    # Group bulletin name must be a str with a maximum length of 5 characters
    with pytest.raises(ValueError):
        m.group_bulletin_name = "ABCDEF"