From 2afbbd6423439f1f42d399ab01a5d2050af7f71c Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Thu, 21 Apr 2016 09:11:00 +0100 Subject: [PATCH] Removed unused requirements and modules. --- README.md | 4 ++++ app/main/encryption.py | 10 ---------- app/main/validators.py | 2 -- requirements.txt | 6 ------ tests/app/main/test_encyption.py | 17 ----------------- 5 files changed, 4 insertions(+), 35 deletions(-) delete mode 100644 app/main/encryption.py delete mode 100644 tests/app/main/test_encyption.py diff --git a/README.md b/README.md index 450fee072..e5b74e5bb 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,10 @@ export ADMIN_CLIENT_USER_NAME='dev-notify-admin' export API_HOST_NAME='http://localhost:6011' export DANGEROUS_SALT='dev-notify-salt' export SECRET_KEY='dev-notify-secret-key' +export DESKPRO_API_HOST="" +export DESKPRO_API_KEY="" +export DESKPRO_PERSON_EMAIL="" +export DESKPRO_TEAM_ID="" "> environment.sh ``` diff --git a/app/main/encryption.py b/app/main/encryption.py deleted file mode 100644 index 51caaab72..000000000 --- a/app/main/encryption.py +++ /dev/null @@ -1,10 +0,0 @@ -from flask.ext.bcrypt import generate_password_hash, check_password_hash - - -def hashpw(password): - return generate_password_hash(password.encode('UTF-8'), 10) - - -def check_hash(password, hashed_password): - # If salt is invalid throws a 500 should add try/catch here - return check_password_hash(hashed_password, password) diff --git a/app/main/validators.py b/app/main/validators.py index 3ae4f500d..533ef0cab 100644 --- a/app/main/validators.py +++ b/app/main/validators.py @@ -1,7 +1,5 @@ import re from wtforms import ValidationError -from datetime import datetime -from app.main.encryption import check_hash from notifications_utils.template import Template diff --git a/requirements.txt b/requirements.txt index baee19ae2..11cc7ae58 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,13 +1,7 @@ Flask==0.10.1 Flask-Script==2.0.5 -Flask-Migrate==1.3.1 -Flask-SQLAlchemy==2.0 -psycopg2==2.6.1 -SQLAlchemy==1.0.5 -SQLAlchemy-Utils==0.30.5 Flask-WTF==0.11 Flask-Login==0.2.11 -Flask-Bcrypt==0.6.2 credstash==1.8.0 boto3==1.2.3 Pygments==2.0.2 diff --git a/tests/app/main/test_encyption.py b/tests/app/main/test_encyption.py deleted file mode 100644 index cb5ef608a..000000000 --- a/tests/app/main/test_encyption.py +++ /dev/null @@ -1,17 +0,0 @@ -from app.main.encryption import hashpw, check_hash - - -def test_should_hash_password(): - password = 'passwordToHash' - assert password != hashpw(password) - - -def test_should_check_password(): - value = 's3curePassword!' - encrypted = hashpw(value) - assert check_hash(value, encrypted) is True - - -def test_checkpw_should_fail_when_pw_does_not_match(): - value = hashpw('somePassword') - assert check_hash('somethingDifferent', value) is False