Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from testrail.testrail import *
- client = APIClient('https://testrail.xxxx.com/')
- client.user = 'xxxx'
- client.password = 'xxx'
- result = client.send_post(
- 'add_result_for_case/11099',
- {'status_id': 1, 'comment': 'something'}
- )
- print(result)
- C:Python27python.exe D:/cache/testrailtest.py
- Traceback (most recent call last):
- File "D:/cache/testrailtest.py", line 13, in <module>
- {'status_id': 1, 'comment': 'something'}
- File "D:cachetestrailtestrail.py", line 52, in send_post
- return self.__send_request('POST', uri, data)
- File "D:cachetestrailtestrail.py", line 65, in __send_request
- response = urllib2.urlopen(request).read()
- File "C:Python27liburllib2.py", line 154, in urlopen
- return opener.open(url, data, timeout)
- File "C:Python27liburllib2.py", line 429, in open
- response = self._open(req, data)
- File "C:Python27liburllib2.py", line 447, in _open
- '_open', req)
- File "C:Python27liburllib2.py", line 407, in _call_chain
- result = func(*args)
- File "C:Python27liburllib2.py", line 1241, in https_open
- context=self._context)
- File "C:Python27liburllib2.py", line 1167, in do_open
- h = http_class(host, timeout=req.timeout, **http_conn_args)
- TypeError: __init__() got an unexpected keyword argument 'context'
Add Comment
Please, Sign In to add comment