mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-06 14:48:24 -04:00
Merge pull request #3361 from alphagov/revert-3357-flask-login
Revert "upgrade flask_login to 0.5.0"
This commit is contained in:
@@ -139,7 +139,6 @@ class User(JSONModel, UserMixin):
|
|||||||
|
|
||||||
def login(self):
|
def login(self):
|
||||||
login_user(self)
|
login_user(self)
|
||||||
session['user_id'] = self.id
|
|
||||||
|
|
||||||
def sign_in(self):
|
def sign_in(self):
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ ago==0.0.93
|
|||||||
humanize==1.0.0
|
humanize==1.0.0
|
||||||
Flask==1.1.1
|
Flask==1.1.1
|
||||||
Flask-WTF==0.14.3
|
Flask-WTF==0.14.3
|
||||||
Flask-Login==0.5.0
|
Flask-Login==0.4.1
|
||||||
|
|
||||||
blinker==1.4
|
blinker==1.4
|
||||||
pyexcel==0.5.15
|
pyexcel==0.5.15
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ ago==0.0.93
|
|||||||
humanize==1.0.0
|
humanize==1.0.0
|
||||||
Flask==1.1.1
|
Flask==1.1.1
|
||||||
Flask-WTF==0.14.3
|
Flask-WTF==0.14.3
|
||||||
Flask-Login==0.5.0
|
Flask-Login==0.4.1
|
||||||
|
|
||||||
blinker==1.4
|
blinker==1.4
|
||||||
pyexcel==0.5.15
|
pyexcel==0.5.15
|
||||||
@@ -30,10 +30,10 @@ git+https://github.com/alphagov/notifications-utils.git@36.6.2#egg=notifications
|
|||||||
git+https://github.com/alphagov/govuk-frontend-jinja.git@v0.5.1-alpha#egg=govuk-frontend-jinja==0.5.1-alpha
|
git+https://github.com/alphagov/govuk-frontend-jinja.git@v0.5.1-alpha#egg=govuk-frontend-jinja==0.5.1-alpha
|
||||||
|
|
||||||
## The following requirements were added by pip freeze:
|
## The following requirements were added by pip freeze:
|
||||||
awscli==1.18.15
|
awscli==1.18.13
|
||||||
bleach==3.1.1
|
bleach==3.1.1
|
||||||
boto3==1.10.38
|
boto3==1.10.38
|
||||||
botocore==1.15.15
|
botocore==1.15.13
|
||||||
certifi==2019.11.28
|
certifi==2019.11.28
|
||||||
chardet==3.0.4
|
chardet==3.0.4
|
||||||
Click==7.0
|
Click==7.0
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ from unittest.mock import patch
|
|||||||
from urllib.parse import parse_qs, urlparse
|
from urllib.parse import parse_qs, urlparse
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from flask import session as flask_session
|
|
||||||
from flask import url_for
|
from flask import url_for
|
||||||
from flask.testing import FlaskClient
|
from flask.testing import FlaskClient
|
||||||
from flask_login import login_user
|
from flask_login import login_user
|
||||||
@@ -28,9 +27,6 @@ class TestClient(FlaskClient):
|
|||||||
|
|
||||||
with patch('app.events_api_client.create_event'):
|
with patch('app.events_api_client.create_event'):
|
||||||
login_user(model_user)
|
login_user(model_user)
|
||||||
with self.session_transaction() as test_session:
|
|
||||||
for key, value in flask_session.items():
|
|
||||||
test_session[key] = value
|
|
||||||
|
|
||||||
def logout(self, user):
|
def logout(self, user):
|
||||||
self.get(url_for("main.sign_out"))
|
self.get(url_for("main.sign_out"))
|
||||||
|
|||||||
@@ -172,13 +172,13 @@ def test_api_documentation_page_should_redirect(
|
|||||||
|
|
||||||
def test_should_show_empty_api_keys_page(
|
def test_should_show_empty_api_keys_page(
|
||||||
client,
|
client,
|
||||||
api_user_active,
|
api_user_pending,
|
||||||
mock_login,
|
mock_login,
|
||||||
mock_get_no_api_keys,
|
mock_get_no_api_keys,
|
||||||
mock_get_service,
|
mock_get_service,
|
||||||
mock_has_permissions,
|
mock_has_permissions,
|
||||||
):
|
):
|
||||||
client.login(api_user_active)
|
client.login(api_user_pending)
|
||||||
service_id = str(uuid.uuid4())
|
service_id = str(uuid.uuid4())
|
||||||
response = client.get(url_for('main.api_keys', service_id=service_id))
|
response = client.get(url_for('main.api_keys', service_id=service_id))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user