vban-cmd-python/tests/__init__.py
onyx-and-iris 85f74b20cb remove underscore from package name
remove underscore from package name
2022-03-04 14:22:29 +00:00

29 lines
724 B
Python

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