Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quick start doesn't work #118

Open
skalinets opened this issue Aug 24, 2022 · 0 comments
Open

Quick start doesn't work #118

skalinets opened this issue Aug 24, 2022 · 0 comments

Comments

@skalinets
Copy link

I am new to the pactman and got stuck on the very first step. I followed the quickstart from the docs, but getting the following error:

Traceback (most recent call last):
  File "/Users/serhii/work/python-pact/test.py", line 33, in test_get_user
    result = get_user('UserA')
  File "/Users/serhii/work/python-pact/test.py", line 10, in get_user
    response = requests.get(f'http://service.example/users/{user_name}')
  File "/Users/serhii/.pyenv/versions/pact/lib/python3.9/site-packages/requests/api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
  File "/Users/serhii/.pyenv/versions/pact/lib/python3.9/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/serhii/.pyenv/versions/pact/lib/python3.9/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/serhii/.pyenv/versions/pact/lib/python3.9/site-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "/Users/serhii/.pyenv/versions/pact/lib/python3.9/site-packages/requests/adapters.py", line 565, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: MockConnectionPool(host='service.example', port=80): Max retries exceeded with url: /users/UserA (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x102363a90>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known'))

The code is in this gist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant