-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Flask to 2.1.1 #3687
Comments
I have actually removed the freezing of version of Also see Karl's #3621 (comment) for more information |
With the update I'm getting 1 failing test: _______________________________________________________________________________________________ TestURLs.test_successful_post_new_issue __________________________________________________________________________________________________
self = <tests.unit.test_urls.TestURLs testMethod=test_successful_post_new_issue>, mock_proxy = <MagicMock name='report_issue' id='4515001488'>
@patch('webcompat.views.report_issue')
def test_successful_post_new_issue(self, mock_proxy):
"""Test that anonymous post succeeds on /issues/new."""
webcompat.app.config['ANONYMOUS_REPORTING_ENABLED'] = True
mock_proxy.return_value = POST_RESPONSE
rv = self.app.post(
'/issues/new',
content_type='multipart/form-data',
environ_base=headers,
data=dict(
browser='Firefox Mobile 45.0',
description='testing 2971',
os='macos',
problem_category='yada',
submit_type='github-proxy-report',
url='http://testing.example.org',
username='yeeha'))
assert rv.status_code == 302
print(rv.headers)
> assert rv.headers['Location'] == 'http://localhost/issues/1544'
E AssertionError: assert '/issues/1544' == 'http://localhost/issues/1544'
E - http://localhost/issues/1544
E + /issues/1544
tests/unit/test_urls.py:78: AssertionError The test is failing because of this change pallets/werkzeug#2352. Also, the corresponding tests are here https://github.com/pallets/flask/pull/4496/files This is not affecting the app, just the tests as far as I can tell, but I'll test the reporting on staging just in case :) |
There are failing tests in the recent builds: https://app.circleci.com/pipelines/github/webcompat/webcompat.com/1893/workflows/3241893d-f701-43bd-b512-94fe64743ad0/jobs/1894
Looks like this is happening because in version 2.1.0,
werkzeug
has removed theas_tuple
argument and this most recent version is installed as a dependency of Flask. Our current version of Flask installed from requirements.txt is 2.0.1 still passes it, therefore the error is thrown.https://flask.palletsprojects.com/en/2.1.x/changes/#version-2-1-0
The test client’s as_tuple parameter is removed. Use response.request.environ instead.
The text was updated successfully, but these errors were encountered: