Upgrade Flask related dependencies #555
GitHub Actions / Test Results
failed
Dec 1, 2023 in 0s
1 fail, 200 pass in 7m 22s
Annotations
Check warning on line 0 in critiquebrainz.frontend.views.test.test_profile.ProfileViewsTestCase
github-actions / Test Results
test_edit (critiquebrainz.frontend.views.test.test_profile.ProfileViewsTestCase) failed
reports/tests.xml [took 2s]
Raw output
AssertionError: 405 != 200 : HTTP Status 200 expected but got 405
self = <critiquebrainz.frontend.views.test.test_profile.ProfileViewsTestCase testMethod=test_edit>
def test_edit(self):
data = dict(
display_name="Some User",
email='[email protected]',
license_choice=self.license["id"]
)
response = self.client.post('/profile/edit', data=data,
query_string=data, follow_redirects=True)
self.assertIn("Please sign in to access this page.", str(response.data))
self.temporary_login(self.user)
response = self.client.post('/profile/edit', data=data,
query_string=data, follow_redirects=True)
self.assert200(response)
# because the g global persists for entire duration of the test, we need to manually logout/login
# the user again for the current_user to be refreshed. in production, this would happen automatically
# as the current_user is loaded at the start of each request/request context.
self.temporary_login(self.user)
response = self.client.post(f'/user/{self.user.id}')
> self.assert200(response)
critiquebrainz/frontend/views/test/test_profile.py:41:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
critiquebrainz/testing.py:138: in assert200
self.assertStatus(response, 200, message)
critiquebrainz/testing.py:135: in assertStatus
self.assertEqual(response.status_code, status_code, message)
E AssertionError: 405 != 200 : HTTP Status 200 expected but got 405
Loading