diff --git a/requirements.txt b/requirements.txt index cdafcce47..38de8e926 100644 --- a/requirements.txt +++ b/requirements.txt @@ -36,16 +36,16 @@ git+https://github.com/alphagov/notifications-utils.git@30.7.4#egg=notifications git+https://github.com/alphagov/boto.git@2.43.0-patch3#egg=boto==2.43.0-patch3 ## The following requirements were added by pip freeze: -alembic==1.0.6 +alembic==1.0.7 amqp==1.4.9 anyjson==0.3.3 attrs==18.2.0 -awscli==1.16.95 +awscli==1.16.96 bcrypt==3.1.6 billiard==3.3.0.23 bleach==3.0.2 boto3==1.6.16 -botocore==1.12.85 +botocore==1.12.86 certifi==2018.11.29 chardet==3.0.4 Click==7.0 @@ -73,7 +73,7 @@ python-editor==1.0.3 python-json-logger==0.1.10 pytz==2018.9 PyYAML==3.12 -redis==3.0.1 +redis==3.1.0 requests==2.21.0 rsa==3.4.2 s3transfer==0.1.13 diff --git a/requirements_for_test.txt b/requirements_for_test.txt index 13951402f..7714e63d8 100644 --- a/requirements_for_test.txt +++ b/requirements_for_test.txt @@ -1,5 +1,5 @@ -r requirements.txt -flake8==3.6.0 +flake8==3.7.3 pytest==3.10.1 moto==1.3.7 pytest-env==0.6.2 diff --git a/tests/app/accept_invite/test_accept_invite_rest.py b/tests/app/accept_invite/test_accept_invite_rest.py index ccdd8e42c..72e72cea8 100644 --- a/tests/app/accept_invite/test_accept_invite_rest.py +++ b/tests/app/accept_invite/test_accept_invite_rest.py @@ -9,19 +9,19 @@ from tests import create_authorization_header @pytest.mark.parametrize('invitation_type', ['service', 'organisation']) def test_validate_invitation_token_for_expired_token_returns_400(client, invitation_type): - with freeze_time('2016-01-01T12:00:00'): - token = generate_token(str(uuid.uuid4()), current_app.config['SECRET_KEY'], - current_app.config['DANGEROUS_SALT']) - url = '/invite/{}/{}'.format(invitation_type, token) - auth_header = create_authorization_header() - response = client.get(url, headers=[('Content-Type', 'application/json'), auth_header]) + with freeze_time('2016-01-01T12:00:00'): + token = generate_token(str(uuid.uuid4()), current_app.config['SECRET_KEY'], + current_app.config['DANGEROUS_SALT']) + url = '/invite/{}/{}'.format(invitation_type, token) + auth_header = create_authorization_header() + response = client.get(url, headers=[('Content-Type', 'application/json'), auth_header]) - assert response.status_code == 400 - json_resp = json.loads(response.get_data(as_text=True)) - assert json_resp['result'] == 'error' - assert json_resp['message'] == {'invitation': [ - 'Your invitation to GOV.UK Notify has expired. ' - 'Please ask the person that invited you to send you another one']} + assert response.status_code == 400 + json_resp = json.loads(response.get_data(as_text=True)) + assert json_resp['result'] == 'error' + assert json_resp['message'] == {'invitation': [ + 'Your invitation to GOV.UK Notify has expired. ' + 'Please ask the person that invited you to send you another one']} @pytest.mark.parametrize('invitation_type', ['service', 'organisation']) diff --git a/tests/app/test_encryption.py b/tests/app/test_encryption.py index d3566b202..a985e04ea 100644 --- a/tests/app/test_encryption.py +++ b/tests/app/test_encryption.py @@ -4,17 +4,17 @@ encryption = Encryption() def test_should_encrypt_content(notify_api): - encryption.init_app(notify_api) - assert encryption.encrypt("this") != "this" + encryption.init_app(notify_api) + assert encryption.encrypt("this") != "this" def test_should_decrypt_content(notify_api): - encryption.init_app(notify_api) - encrypted = encryption.encrypt("this") - assert encryption.decrypt(encrypted) == "this" + encryption.init_app(notify_api) + encrypted = encryption.encrypt("this") + assert encryption.decrypt(encrypted) == "this" def test_should_encrypt_json(notify_api): - encryption.init_app(notify_api) - encrypted = encryption.encrypt({"this": "that"}) - assert encryption.decrypt(encrypted) == {"this": "that"} + encryption.init_app(notify_api) + encrypted = encryption.encrypt({"this": "that"}) + assert encryption.decrypt(encrypted) == {"this": "that"}