vban-cmd-python/tests/__init__.py
onyx-and-iris 83429e17ad edits to tests
add more tests to higher.

added opts to tests.

removed delay, max_polls from runmany, not required for these tests.
2022-02-28 18:14:31 +00:00

29 lines
734 B
Python

import vban_cmd
from vban_cmd import kinds
from vban_cmd.channel import Modes
import socket
from threading import Thread
from time import sleep
_kind = 'potato'
opts = {
'ip': 'ws.local',
'streamname': 'testing',
'port': 6980,
'bps': 0,
}
vbanrs = {kind.id: vban_cmd.connect(_kind, **opts) for kind in kinds.all}
tests = vbanrs[_kind]
def setup_package():
tests._rt_packet_socket.bind((socket.gethostbyname(socket.gethostname()), tests._port))
tests.worker = Thread(target=tests._send_register_rt, daemon=True)
tests.worker.start()
tests._modes = Modes()
def teardown_package():
tests._rt_packet_socket.close()
tests._rt_register_socket.close()
tests._sendrequest_string_socket.close()