def test_unix_domain_adapter_monkeypatch():
    with UnixSocketServerThread() as usock_thread:
        with requests_unixsocket.monkeypatch('http+unix://'):
            urlencoded_usock = requests.compat.quote_plus(usock_thread.usock)
            url = urlencoded_usock % 'http+unix://%s/path/to/page'

            for method in ['get', 'post', 'head', 'patch', 'put', 'delete',
                           'options']:
                logger.debug('Calling session.%s(%r) ...', method, url)
                r = getattr(requests, method)(url)
                logger.debug(
                    'Received response: %r with text: %r and headers: %r',
                    r, r.text, r.headers)
                assert r.status_code == 200
                assert r.headers['server'] == 'waitress'
                assert r.headers['X-Transport'] == 'unix domain socket'
                assert r.headers['X-Requested-Path'] == '/path/to/page'
                assert r.headers['X-Socket-Path'] == usock_thread.usock
                assert isinstance(r.connection,
                                  requests_unixsocket.UnixAdapter)
                assert r.url == url
                if method == 'head':
                    assert r.text == ''
                else:
                    assert r.text == 'Hello world!'

    for method in ['get', 'post', 'head', 'patch', 'put', 'delete', 'options']:
        with pytest.raises(requests.exceptions.InvalidSchema):
            getattr(requests, method)(url)
dataset/ETHPy150Open msabramo/requests-unixsocket/requests_unixsocket/tests/test_requests_unixsocket.py/test_unix_domain_adapter_monkeypatch/swapped operands of `%`