Skip to content

Commit

Permalink
Fixing test_http_check.py to contemplate new weakciphers config param.
Browse files Browse the repository at this point in the history
fixing flake8 issue.

More flake8 issue.
  • Loading branch information
truthbk committed Oct 19, 2015
1 parent 40206f3 commit 2926384
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions checks.d/http_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ def _new_pool(self, scheme, host, port):
return WeakCiphersHTTPSConnectionPool(host, port, **(self.connection_pool_kw))
return super(WeakCiphersPoolManager, self)._new_pool(scheme, host, port)


class WeakCiphersAdapter(HTTPAdapter):
""""Transport adapter" that allows us to use TLS_RSA_WITH_RC4_128_MD5."""

def init_poolmanager(self, connections, maxsize, block=False,
**pool_kwargs):
def init_poolmanager(self, connections, maxsize, block=False, **pool_kwargs):
# Rewrite of the
# requests.adapters.HTTPAdapter.init_poolmanager method
# to use WeakCiphersPoolManager instead of
Expand Down
2 changes: 1 addition & 1 deletion tests/checks/integration/test_http_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def test_http_headers(self):
url, username, password, http_response_status_code, timeout,\
include_content, headers, response_time, content_match,\
tags, ssl, ssl_expiration,\
instance_ca_certs = self.check._load_conf(CONFIG_HTTP_HEADERS['instances'][0])
instance_ca_certs, weakciphers = self.check._load_conf(CONFIG_HTTP_HEADERS['instances'][0])

self.assertEqual(headers["X-Auth-Token"], "SOME-AUTH-TOKEN", headers)
expected_headers = agent_headers(AGENT_CONFIG).get('User-Agent')
Expand Down

0 comments on commit 2926384

Please sign in to comment.