def test_text(self):
    '\n        When passed a text, `Connection.send` transmits all of it and\n        returns the number of bytes sent. It also raises a DeprecationWarning.\n        '
    (server, client) = loopback()
    with pytest.warns(DeprecationWarning) as w:
        simplefilter('always')
        count = server.send(b'xy'.decode('ascii'))
        assert ('{0} for buf is no longer accepted, use bytes'.format(WARNING_TYPE_EXPECTED) == str(w[(- 1)].message))
    assert (count == 2)
    assert (client.recv(2) == b'xy')
When passed a text, `Connection.send` transmits all of it and
returns the number of bytes sent. It also raises a DeprecationWarning.
def test_text(self):
    '\n        When passed a text, `Connection.send` transmits all of it and\n        returns the number of bytes sent. It also raises a DeprecationWarning.\n        '
    (server, client) = loopback()
    with pytest.warns(DeprecationWarning) as w:
        simplefilter('always')
        count = server.send(b'xy'.decode('ascii'))
        assert ('{0} for buf is no longer accepted, use bytes'.format(WARNING_TYPE_EXPECTED) == str(w[(- 1)].message))
    assert (count == 2)
    assert (client.recv(2) == b'xy')