Guest User

Untitled

a guest
Dec 12th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. from testrail.testrail import *
  2.  
  3. client = APIClient('https://testrail.xxxx.com/')
  4. client.user = 'xxxx'
  5. client.password = 'xxx'
  6.  
  7.  
  8. result = client.send_post(
  9. 'add_result_for_case/11099',
  10. {'status_id': 1, 'comment': 'something'}
  11. )
  12.  
  13. print(result)
  14.  
  15. C:Python27python.exe D:/cache/testrailtest.py
  16. Traceback (most recent call last):
  17. File "D:/cache/testrailtest.py", line 13, in <module>
  18. {'status_id': 1, 'comment': 'something'}
  19. File "D:cachetestrailtestrail.py", line 52, in send_post
  20. return self.__send_request('POST', uri, data)
  21. File "D:cachetestrailtestrail.py", line 65, in __send_request
  22. response = urllib2.urlopen(request).read()
  23. File "C:Python27liburllib2.py", line 154, in urlopen
  24. return opener.open(url, data, timeout)
  25. File "C:Python27liburllib2.py", line 429, in open
  26. response = self._open(req, data)
  27. File "C:Python27liburllib2.py", line 447, in _open
  28. '_open', req)
  29. File "C:Python27liburllib2.py", line 407, in _call_chain
  30. result = func(*args)
  31. File "C:Python27liburllib2.py", line 1241, in https_open
  32. context=self._context)
  33. File "C:Python27liburllib2.py", line 1167, in do_open
  34. h = http_class(host, timeout=req.timeout, **http_conn_args)
  35. TypeError: __init__() got an unexpected keyword argument 'context'
Add Comment
Please, Sign In to add comment