File: testing.rst

package info (click to toggle)
panoramisk 1.4-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 604 kB
  • sloc: python: 1,557; makefile: 133; sh: 28
file content (24 lines) | stat: -rw-r--r-- 614 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
==========================================
:mod:`panoramisk.testing` - Writing tests
==========================================

..
    >>> import os
    >>> stream = os.path.join('tests', 'fixtures', 'ping.yaml')

.. code-block:: python

    >>> from panoramisk import testing
    >>> manager = testing.Manager(stream=stream)  # stream is a filename contaning an Asterisk trace
    >>> future = manager.send_action({'Action': 'Ping'})
    >>> resp = future.result()
    >>> assert 'ping' in resp
    >>> assert resp.ping == 'Pong'

API
---

.. automodule:: panoramisk.testing

.. autoclass:: Manager
   :members: