Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /usr/bin/python2.7 /home/yana/QA/mine/test_cost_update_cogs.py
- Resetting phone numbers
- ============================= test session starts ==============================
- platform linux2 -- Python 2.7.6, pytest-2.8.7, py-1.4.31, pluggy-0.3.1 -- /usr/bin/python2.7
- cachedir: .cache
- rootdir: /home/yana/QA/mine, inifile:
- plugins: xdist-1.13.1
- collecting ... collected 5 items
- test_cost_update_cogs.py::test_invalid_mccmnc_update Creating user costu8ebcd6T_test
- 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
- HTTP request: http://qa1.internal:8009/quota/json?cmd=purchase&account=costu8ebcd6T_test&amount=10000&price=10000
- ERROR
- ==================================== ERRORS ====================================
- _________________ ERROR at setup of test_invalid_mccmnc_update _________________
- module = <module 'test_cost_update_cogs' from '/home/yana/QA/mine/test_cost_update_cogs.py'>
- def setup_module(module):
- global u
- global params_cost
- api_key = 'costu'
- > u = accounts.create_d_user(api_key, capabilities='<capability id="cost-api" />')
- test_cost_update_cogs.py:18:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- ../qatests/common/accounts.py:148: in create_d_user
- quota = requests.get(DEFAULT_QUOTA_URL % locals())
- /usr/lib/python2.7/dist-packages/requests/api.py:55: in get
- return request('get', url, **kwargs)
- /usr/lib/python2.7/dist-packages/requests/api.py:44: in request
- return session.request(method=method, url=url, **kwargs)
- /usr/lib/python2.7/dist-packages/requests/sessions.py:455: in request
- resp = self.send(prep, **send_kwargs)
- /usr/lib/python2.7/dist-packages/requests/sessions.py:558: in send
- r = adapter.send(request, **kwargs)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <requests.adapters.HTTPAdapter object at 0x7f8169af1910>
- request = <PreparedRequest [GET]>, stream = False
- timeout = <urllib3.util.Timeout object at 0x7f8169af1b90>, verify = True
- cert = None, proxies = OrderedDict()
- def send(self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None):
- """Sends PreparedRequest object. Returns Response object.
- :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
- :param stream: (optional) Whether to stream the request content.
- :param timeout: (optional) The timeout on the request.
- :param verify: (optional) Whether to verify SSL certificates.
- :param cert: (optional) Any user-provided SSL certificate to be trusted.
- :param proxies: (optional) The proxies dictionary to apply to the request.
- """
- conn = self.get_connection(request.url, proxies)
- self.cert_verify(conn, request.url, verify, cert)
- url = self.request_url(request, proxies)
- self.add_headers(request)
- chunked = not (request.body is None or 'Content-Length' in request.headers)
- if stream:
- timeout = TimeoutSauce(connect=timeout)
- else:
- timeout = TimeoutSauce(connect=timeout, read=timeout)
- try:
- if not chunked:
- resp = conn.urlopen(
- method=request.method,
- url=url,
- body=request.body,
- headers=request.headers,
- redirect=False,
- assert_same_host=False,
- preload_content=False,
- decode_content=False,
- retries=self.max_retries,
- timeout=timeout
- )
- # Send the request.
- else:
- if hasattr(conn, 'proxy_pool'):
- conn = conn.proxy_pool
- low_conn = conn._get_conn(timeout=timeout)
- try:
- low_conn.putrequest(request.method,
- url,
- skip_accept_encoding=True)
- for header, value in request.headers.items():
- low_conn.putheader(header, value)
- low_conn.endheaders()
- for i in request.body:
- low_conn.send(hex(len(i))[2:].encode('utf-8'))
- low_conn.send(b'\r\n')
- low_conn.send(i)
- low_conn.send(b'\r\n')
- low_conn.send(b'0\r\n\r\n')
- r = low_conn.getresponse()
- resp = HTTPResponse.from_httplib(
- r,
- pool=conn,
- connection=low_conn,
- preload_content=False,
- decode_content=False
- )
- except:
- # If we hit any problems here, clean up the connection.
- # Then, reraise so that we can handle the actual exception.
- low_conn.close()
- raise
- else:
- # All is well, return the connection to the pool.
- conn._put_conn(low_conn)
- except socket.error as sockerr:
- raise ConnectionError(sockerr)
- except MaxRetryError as e:
- > raise ConnectionError(e)
- 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)
- /usr/lib/python2.7/dist-packages/requests/adapters.py:378: ConnectionError
- !!!!!!!!!!!!!!!!!!!! Interrupted: stopping after 1 failures !!!!!!!!!!!!!!!!!!!!
- =========================== 1 error in 0.79 seconds ============================
- Process finished with exit code 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement