Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test___dump(capsys):
options = Mock()
options.repeat = 2
options.host = 'localhost'
options.port = randint(60000, 65535)
options.address = b'/test'
options.safer = False
options.encoding = None
options.encoding_errors = 'strict'
options.message = (1, 2, 3, 4, b"hello world")
osc = __dump(options)
out = capsys.readouterr().out
assert out == ''
send_message(
options.address,
options.message,
options.host,
options.port,
safer=options.safer,
encoding=options.encoding,
encoding_errors=options.encoding_errors
)
sleep(0.1)
out, err = capsys.readouterr()
assert err == ''