From 6ac82304bff307761da169aa8b419f467724f5ee Mon Sep 17 00:00:00 2001 From: Sean Marlow Date: Tue, 7 Aug 2018 10:25:03 -0600 Subject: [PATCH 1/2] Switch test requirement to pytest-flake8. Flake8 runs both pyflakes and codestyle. Pep8 was renamed to and supported as codestyle. --- .travis.yml | 3 ++- requirements_dev.txt | 5 ++--- setup.py | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4d45da9..61ebda7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,7 @@ matrix: before_install: - if [[ $TRAVIS_PYTHON_VERSION == '3.2' ]]; then pip install 'coverage<4.0.0'; fi - pip install codecov +- pip install 'py>=1.5.0' install: - pip install -e . - pip install -r requirements_dev.txt @@ -27,4 +28,4 @@ deploy: secure: iZWZuDMIWyFtJf5cLDPwA82d7DVi+/8yBQJVowctJwkioz4PEZBrf4N7cKyFc7JlhsS0/gqPJ9nw1FBqHwlTFwikpCYjudcfVijzibwKBbTbYTbTY1xEYiv+2/Q2UGoGjGmf2qdqM9SBaQwvax+KgMO6e4I4vrX4cm3kMx4LHt0Z2ArORlhZ0oKxyi6azcFiZYwlOlp31PuV0iNpBkroBf+gQ20S35hD+GIm1U6D4zqkN0HmZ0LxlpZLXsHZ0FrEE57KU06RowWfkAFBkGjMBjr+phiZ/XRe88SFaiB3HVZaJm+ZPTJKnxryuGt5th54Q10DKLZ3KUien33saBYVziamHZ8ZYS01ztahEhqLKlQVB1e+p1M8mYXKVodqLgytOsddixIBmibq2rDJmLSPwro8RBwLhLdGZdRsH2kii06OQxPrzlUrOwtErozxvdNjS47hwjJ4ZVm4ZGcnOXZut4qwkiEEUMWUd54V+zDNnRxOf+hi/mEx3u8CmkV26XFJ7WHpr/E1T9XHuRh7YVP8MXrM3gjoL86g1swalpH/QBjf0UaF2BlTvWJ3j52uThH7MFUlCBgpYer1giJayyNjFw4+qUVMCyByD87V7x6/3glA7t4Kh0LiMq0Zo23PPbhuJOmJmDy6GTtjkXZEJ6XnNPV9+VR8LApmppevBDKafgA= distributions: sdist bdist_wheel on: - tags: true \ No newline at end of file + tags: true diff --git a/requirements_dev.txt b/requirements_dev.txt index 2326086..cbc4f86 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,6 +1,5 @@ mock pytest -pytest-pep8 -pytest-flakes +pytest-flake8 pytest-cov -flask \ No newline at end of file +flask diff --git a/setup.py b/setup.py index 8813608..57b375f 100644 --- a/setup.py +++ b/setup.py @@ -38,8 +38,7 @@ class PyTest(TestCommand): TestCommand.finalize_options(self) self.test_args = [ '-sv', - '--pep8', - '--flakes', + '--flake8', '--junitxml', 'reports/junit.xml', '--cov', 'openapi_core', '--cov-report', 'term-missing', From dccb93bbfe72a50c8abf38b3925b5ee61e0c2839 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Artur=20Maci=C4=85g?= Date: Sun, 24 Feb 2019 02:28:45 +0000 Subject: [PATCH 2/2] test validaotr escape sequence fix --- tests/integration/test_validators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/test_validators.py b/tests/integration/test_validators.py index 43c185a..6b43ba8 100644 --- a/tests/integration/test_validators.py +++ b/tests/integration/test_validators.py @@ -282,7 +282,7 @@ class TestResponseValidator(object): def test_invalid_media_type_value(self, validator): request = MockRequest(self.host_url, 'get', '/v1/pets') - response = MockResponse('\{\}') + response = MockResponse("{}") result = validator.validate(request, response)