From 7fff5afa39484cbfa11a9012cd3786183cd3cdf0 Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Fri, 3 Jul 2015 07:43:22 +0300 Subject: [PATCH] Minor cosmetic fixes. --- tests/test_002-invalid-requests.py | 5 +++-- tests/test_008-arbiter-env.py | 8 +++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/test_002-invalid-requests.py b/tests/test_002-invalid-requests.py index 4742acf2..a4748640 100644 --- a/tests/test_002-invalid-requests.py +++ b/tests/test_002-invalid-requests.py @@ -3,17 +3,18 @@ # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. -import treq - import glob import os import pytest +import treq + dirname = os.path.dirname(__file__) reqdir = os.path.join(dirname, "requests", "invalid") httpfiles = glob.glob(os.path.join(reqdir, "*.http")) + @pytest.mark.parametrize("fname", httpfiles) def test_http_parser(fname): env = treq.load_py(os.path.splitext(fname)[0] + ".py") diff --git a/tests/test_008-arbiter-env.py b/tests/test_008-arbiter-env.py index 1ff0f684..ffcf33a5 100644 --- a/tests/test_008-arbiter-env.py +++ b/tests/test_008-arbiter-env.py @@ -3,13 +3,13 @@ # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. -import t import os -from gunicorn.app.base import BaseApplication + +import gunicorn.app.base import gunicorn.arbiter -class PreloadedAppWithEnvSettings(BaseApplication): +class PreloadedAppWithEnvSettings(gunicorn.app.base.BaseApplication): """ Simple application that makes use of the 'preload' feature to start the application before spawning worker processes and sets @@ -18,11 +18,9 @@ class PreloadedAppWithEnvSettings(BaseApplication): def init(self, parser, opts, args): """No-op""" - pass def load(self): """No-op""" - pass def load_config(self): """Set the 'preload_app' and 'raw_env' settings in order to verify their