Skip to content

Commit 2c5f458

Browse files
committed
fixup
1 parent 5b37c7e commit 2c5f458

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

mig/wsgi-bin/migwsgi.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ def stub(configuration, client_id, user_arguments_dict, environ, _retrieve_handl
8383
# NEVER print/output it verbatim before it is validated below.
8484

8585
try:
86+
default_page = configuration.site_landing_page # TODO: avoid doing this work a second time
8687
backend = requested_backend(environ, fallback=default_page)
8788
valid_backend_name(backend)
8889
except InputException as iex:
@@ -210,9 +211,9 @@ def application(environ, start_response):
210211
def _set_os_environ(value):
211212
os.environ = value
212213

213-
return _application(environ, start_response, _format_output=format_output, _set_environ=_set_os_environ, _wrap_wsgi_errors=wrap_wsgi_errors)
214+
return _application(environ, start_response, _set_environ=_set_os_environ, _wrap_wsgi_errors=wrap_wsgi_errors)
214215

215-
def _application(environ, start_response, _format_output, _set_environ, _retrieve_handler=_import_backend, _wrap_wsgi_errors=True, _config_file=None, _skip_log=False):
216+
def _application(environ, start_response, _set_environ, _retrieve_handler=_import_backend, _wrap_wsgi_errors=True, _config_file=None, _skip_log=False):
216217

217218
# NOTE: pass app environ including apache and query args on to sub handlers
218219
# through the usual 'os.environ' channel expected in functionality

tests/test_mig_wsgi-bin_migwsgi.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import sys
3434

3535
from tests.support import MIG_BASE, MigTestCase, testmain
36-
36+
import mig.shared.returnvalues as returnvalues
3737

3838
def create_output_returner(arranged=None):
3939
def test_format_output(*args):
@@ -108,7 +108,7 @@ def test_xxx(self):
108108
config_global_values = _assert_local_config_global_values(config)
109109

110110
def fake_handler(*args):
111-
pass
111+
return [], returnvalues.OK
112112

113113
def fake_start_response(status, headers, exc=None):
114114
fake_start_response.calls.append((status, headers, exc))
@@ -127,7 +127,6 @@ def fake_set_environ(value):
127127
test_output_returner = create_output_returner('HELLO WORLD')
128128

129129
yielder = migwsgi._application(wsgi_environ, fake_start_response,
130-
_format_output=test_output_returner,
131130
_set_environ=fake_set_environ,
132131
_retrieve_handler=lambda _: fake_handler,
133132
_wrap_wsgi_errors=noop,

0 commit comments

Comments
 (0)