daily pastebin goal
84%
SHARE
TWEET

Untitled

a guest Jan 28th, 2016 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /usr/bin/python2.7 /home/yana/QA/mine/test_cost_update_cogs.py
  2. Resetting phone numbers
  3. ============================= test session starts ==============================
  4. platform linux2 -- Python 2.7.6, pytest-2.8.7, py-1.4.31, pluggy-0.3.1 -- /usr/bin/python2.7
  5. cachedir: .cache
  6. rootdir: /home/yana/QA/mine, inifile:
  7. plugins: xdist-1.13.1
  8. collecting ... collected 5 items
  9.  
  10. test_cost_update_cogs.py::test_invalid_mccmnc_update Creating user costu8ebcd6T_test
  11. HTTP request: http://qa1.internal:8019/provisioning/api?xml=<?xml version="1.0" encoding="UTF-8"?> <account sysid="costu8ebcd6T_test" password="costu8ebcd6T_test" max-binds="2"   max-mt-per-second="100" max-mo-per-second="2" smpp-enabled="false" use-http="true"   http-mo-base-url="" http-dn-base-url="" http-post-username="" http-post-password=""   http-post-method="get" encoding="latin9"> <mo-queue enabled="true" mo-required="true"   delivery-receipts-required="true" queue-size="50" discard-when-queue-full="false" /> <quota enabled="true" pricing-group-id="" mo-quota-enabled="true" /> <banned banned="false" reason="" /> <routing group-id="" /> <dlr-format message-id-is-in-hex="false" /> <special-capabilities>  <internal can-specify-explicit-message-id="false" />  <automatically-ack-mo-and-dlr enabled="false" />  <custom-so-timeout value="0" />  <custom-mo-window-size value="0" />  <tlv can-specify-explicit-network-code="false" />  <smpp-nack include-message-id="true" />  <capabilities><capability id="cost-api" /></capabilities> </special-capabilities> <restrictions></restrictions> <security sign-mo-and-dlr-http-requests="false"   require-signed-http-submissions="false" secret-key="" /> <capacity-thresholds><threshold id="max-concurrent-calls" max="1000" /></capacity-thresholds><time-created>2016-01-28 16:19:43</time-created> <time-of-last-activity>2016-01-28 16:19:43</time-of-last-activity> <time-last-modified>2016-01-28 16:19:43</time-last-modified> </account>&cmd=create-account&auto-top-up=true
  12. HTTP request: http://qa1.internal:8009/quota/json?cmd=purchase&account=costu8ebcd6T_test&amount=10000&price=10000
  13. ERROR
  14.  
  15. ==================================== ERRORS ====================================
  16. _________________ ERROR at setup of test_invalid_mccmnc_update _________________
  17.  
  18. module = <module 'test_cost_update_cogs' from '/home/yana/QA/mine/test_cost_update_cogs.py'>
  19.  
  20.     def setup_module(module):
  21.         global u
  22.         global params_cost
  23.         api_key = 'costu'
  24. >       u = accounts.create_d_user(api_key, capabilities='<capability id="cost-api" />')
  25.  
  26. test_cost_update_cogs.py:18:
  27. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  28. ../qatests/common/accounts.py:148: in create_d_user
  29.     quota = requests.get(DEFAULT_QUOTA_URL % locals())
  30. /usr/lib/python2.7/dist-packages/requests/api.py:55: in get
  31.     return request('get', url, **kwargs)
  32. /usr/lib/python2.7/dist-packages/requests/api.py:44: in request
  33.     return session.request(method=method, url=url, **kwargs)
  34. /usr/lib/python2.7/dist-packages/requests/sessions.py:455: in request
  35.     resp = self.send(prep, **send_kwargs)
  36. /usr/lib/python2.7/dist-packages/requests/sessions.py:558: in send
  37.     r = adapter.send(request, **kwargs)
  38. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  39.  
  40. self = <requests.adapters.HTTPAdapter object at 0x7f8169af1910>
  41. request = <PreparedRequest [GET]>, stream = False
  42. timeout = <urllib3.util.Timeout object at 0x7f8169af1b90>, verify = True
  43. cert = None, proxies = OrderedDict()
  44.  
  45.     def send(self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None):
  46.         """Sends PreparedRequest object. Returns Response object.
  47.    
  48.             :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
  49.             :param stream: (optional) Whether to stream the request content.
  50.             :param timeout: (optional) The timeout on the request.
  51.             :param verify: (optional) Whether to verify SSL certificates.
  52.             :param cert: (optional) Any user-provided SSL certificate to be trusted.
  53.             :param proxies: (optional) The proxies dictionary to apply to the request.
  54.             """
  55.    
  56.         conn = self.get_connection(request.url, proxies)
  57.    
  58.         self.cert_verify(conn, request.url, verify, cert)
  59.         url = self.request_url(request, proxies)
  60.         self.add_headers(request)
  61.    
  62.         chunked = not (request.body is None or 'Content-Length' in request.headers)
  63.    
  64.         if stream:
  65.             timeout = TimeoutSauce(connect=timeout)
  66.         else:
  67.             timeout = TimeoutSauce(connect=timeout, read=timeout)
  68.    
  69.         try:
  70.             if not chunked:
  71.                 resp = conn.urlopen(
  72.                     method=request.method,
  73.                     url=url,
  74.                     body=request.body,
  75.                     headers=request.headers,
  76.                     redirect=False,
  77.                     assert_same_host=False,
  78.                     preload_content=False,
  79.                     decode_content=False,
  80.                     retries=self.max_retries,
  81.                     timeout=timeout
  82.                 )
  83.    
  84.             # Send the request.
  85.             else:
  86.                 if hasattr(conn, 'proxy_pool'):
  87.                     conn = conn.proxy_pool
  88.    
  89.                 low_conn = conn._get_conn(timeout=timeout)
  90.    
  91.                 try:
  92.                     low_conn.putrequest(request.method,
  93.                                         url,
  94.                                         skip_accept_encoding=True)
  95.    
  96.                     for header, value in request.headers.items():
  97.                         low_conn.putheader(header, value)
  98.    
  99.                     low_conn.endheaders()
  100.    
  101.                     for i in request.body:
  102.                         low_conn.send(hex(len(i))[2:].encode('utf-8'))
  103.                         low_conn.send(b'\r\n')
  104.                         low_conn.send(i)
  105.                         low_conn.send(b'\r\n')
  106.                     low_conn.send(b'0\r\n\r\n')
  107.    
  108.                     r = low_conn.getresponse()
  109.                     resp = HTTPResponse.from_httplib(
  110.                         r,
  111.                         pool=conn,
  112.                         connection=low_conn,
  113.                         preload_content=False,
  114.                         decode_content=False
  115.                     )
  116.                 except:
  117.                     # If we hit any problems here, clean up the connection.
  118.                     # Then, reraise so that we can handle the actual exception.
  119.                     low_conn.close()
  120.                     raise
  121.                 else:
  122.                     # All is well, return the connection to the pool.
  123.                     conn._put_conn(low_conn)
  124.    
  125.         except socket.error as sockerr:
  126.             raise ConnectionError(sockerr)
  127.    
  128.         except MaxRetryError as e:
  129. >           raise ConnectionError(e)
  130. E           ConnectionError: HTTPConnectionPool(host='qa1.internal', port=8009): Max retries exceeded with url: /quota/json?cmd=purchase&account=costu8ebcd6T_test&amount=10000&price=10000 (Caused by <class 'socket.error'>: [Errno 111] Connection refused)
  131.  
  132. /usr/lib/python2.7/dist-packages/requests/adapters.py:378: ConnectionError
  133. !!!!!!!!!!!!!!!!!!!! Interrupted: stopping after 1 failures !!!!!!!!!!!!!!!!!!!!
  134. =========================== 1 error in 0.79 seconds ============================
  135.  
  136. Process finished with exit code 0
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top