<commit_before>import dbus
from gabbletest import exec_test, elem, elem_iq, sync_stream, make_presence
from servicetest import EventPattern
from caps_helper import make_caps_disco_reply

from twisted.words.xish import xpath

import ns
import constants as cs
from bytestream import create_from_si_offer, BytestreamS5B

def test(q, bus, conn, stream):
    conn.Connect()

    # discard activities request and status change
    _, e = q.expect_many(
        EventPattern('dbus-signal', signal='StatusChanged', args=[0, 1]),
        EventPattern('stream-iq', to='fallback-proxy.localhost', iq_type='get', query_ns=ns.BYTESTREAMS))

    reply = elem_iq(stream, 'result', id=e.stanza['id'])(
        elem(ns.BYTESTREAMS, 'query')(
            elem('streamhost', jid='fallback-proxy.localhost', host='127.0.0.1', port='12345')()))
    stream.send(reply)

    # Offer a private D-Bus tube just to check if the proxy is present in the
    # SOCKS5 offer
    requestotron = dbus.Interface(conn, cs.CONN_IFACE_REQUESTS)<commit_msg>remove useless comment<commit_after>import dbus
from gabbletest import exec_test, elem, elem_iq, sync_stream, make_presence
from servicetest import EventPattern
from caps_helper import make_caps_disco_reply

from twisted.words.xish import xpath

import ns
import constants as cs
from bytestream import create_from_si_offer, BytestreamS5B

def test(q, bus, conn, stream):
    conn.Connect()

    _, e = q.expect_many(
        EventPattern('dbus-signal', signal='StatusChanged', args=[0, 1]),
        EventPattern('stream-iq', to='fallback-proxy.localhost', iq_type='get', query_ns=ns.BYTESTREAMS))

    reply = elem_iq(stream, 'result', id=e.stanza['id'])(
        elem(ns.BYTESTREAMS, 'query')(
            elem('streamhost', jid='fallback-proxy.localhost', host='127.0.0.1', port='12345')()))
    stream.send(reply)

    # Offer a private D-Bus tube just to check if the proxy is present in the
    # SOCKS5 offer
    requestotron = dbus.Interface(conn, cs.CONN_IFACE_REQUESTS)
{'fraction_non_alphanumeric': 0.11561561561561562, 'fraction_numerical': 0.015015015015015015, 'mean_word_length': 4.491758241758242, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5926437', 'n_tokens_mistral': 671, 'n_tokens_neox': 644, 'n_words': 167}