From f802d6bfa343fc40139f2eececd432867fa2f6a5 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen <paulus@paulusschoutsen.nl> Date: Sun, 21 Aug 2016 11:44:40 -0700 Subject: [PATCH] Update test packages (#2918) --- requirements_test.txt | 7 +++---- setup.cfg | 2 +- tests/components/test_http.py | 12 ++++++------ 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/requirements_test.txt b/requirements_test.txt index 233856e8363..a996ef411c3 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -1,11 +1,10 @@ -flake8>=2.6.0 +flake8>=3.0.4 pylint>=1.5.6 -astroid>=1.4.8 coveralls>=1.1 pytest>=2.9.2 -pytest-cov>=2.2.1 +pytest-cov>=2.3.1 pytest-timeout>=1.0.0 -pytest-capturelog>=0.7 +pytest-catchlog>=1.2.2 pydocstyle>=1.0.0 requests_mock>=1.0 mypy-lang>=0.4 diff --git a/setup.cfg b/setup.cfg index b11dfac0c42..98a4f54d55d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,7 @@ [wheel] universal = 1 -[pytest] +[tool:pytest] testpaths = tests norecursedirs = .git testing_config diff --git a/tests/components/test_http.py b/tests/components/test_http.py index 7a6d7af673f..ef491a91b36 100644 --- a/tests/components/test_http.py +++ b/tests/components/test_http.py @@ -75,8 +75,8 @@ class TestHttp: def test_access_with_password_in_header(self, caplog): """Test access with password in URL.""" # Hide logging from requests package that we use to test logging - caplog.setLevel(logging.WARNING, - logger='requests.packages.urllib3.connectionpool') + caplog.set_level(logging.WARNING, + logger='requests.packages.urllib3.connectionpool') req = requests.get( _url(const.URL_API), @@ -84,7 +84,7 @@ class TestHttp: assert req.status_code == 200 - logs = caplog.text() + logs = caplog.text # assert const.URL_API in logs assert API_PASSWORD not in logs @@ -99,15 +99,15 @@ class TestHttp: def test_access_with_password_in_url(self, caplog): """Test access with password in URL.""" # Hide logging from requests package that we use to test logging - caplog.setLevel(logging.WARNING, - logger='requests.packages.urllib3.connectionpool') + caplog.set_level(logging.WARNING, + logger='requests.packages.urllib3.connectionpool') req = requests.get(_url(const.URL_API), params={'api_password': API_PASSWORD}) assert req.status_code == 200 - logs = caplog.text() + logs = caplog.text # assert const.URL_API in logs assert API_PASSWORD not in logs -- GitLab