How to use the panoramisk.utils.EOL function in panoramisk

To help you get started, we’ve selected a few panoramisk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github osantana / ami-push / tests / test_messages.py View on Github external
Privilege: dialplan,all
Channel: SIP/test
ChannelState: 4
ChannelStateDesc: Ring
CallerIDNum: 0055551234
CallerIDName: 0055551234
ConnectedLineNum: 
ConnectedLineName: 
Language: en
Context: income-call
Exten: test
Priority: 4
Uniqueid: 1444884710.0
Variable: CALL_ID
Value: 5aeb879d-753e-48f2-92da-22ae0653cee8
""".replace("\n", utils.EOL)


def test_message_from_message():
    message = Message({"Uniqueid": "1444884710.0"})
    wrapper = MessageWrapper(message)
    assert wrapper.uniqueid == "1444884710.0"
    assert wrapper.keyid == "1444884710"


def test_message_from_text():
    wrapper = MessageWrapper(MESSAGE)
    assert wrapper.uniqueid == "1444884710.0"

    assert "language" in wrapper
    assert wrapper.language == "en"
    assert wrapper["language"] == "en"

panoramisk

asyncio based library to play with asterisk

MIT
Latest version published 3 years ago

Package Health Score

54 / 100
Full package analysis

Similar packages