Skip to content

Commit

Permalink
[#3194] Setting HTTP_HOST shouldn't be required
Browse files Browse the repository at this point in the history
  • Loading branch information
wardi committed Sep 16, 2016
1 parent fb47fe8 commit b7e2971
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions ckan/tests/helpers.py
Expand Up @@ -19,7 +19,6 @@
This module is reserved for these very useful functions.
'''
import urlparse
import webtest
import nose.tools
from nose.tools import assert_in, assert_not_in
Expand Down Expand Up @@ -214,12 +213,6 @@ def submit_and_follow(app, form, extra_environ=None, name=None,
Call webtest_submit with name/value passed expecting a redirect
and return the response from following that redirect.
'''
if extra_environ is None:
extra_environ = {}
if not extra_environ.get('HTTP_HOST'):
extra_environ['HTTP_HOST'] = str(
urlparse.urlparse(config['ckan.site_url']).netloc)

response = webtest_submit(form, name, value=value, status=302,
extra_environ=extra_environ, **args)
return app.get(url=response.headers['Location'],
Expand Down

0 comments on commit b7e2971

Please sign in to comment.