mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-25 08:44:23 -04:00
Removed unused requirements and modules.
This commit is contained in:
@@ -67,6 +67,10 @@ export ADMIN_CLIENT_USER_NAME='dev-notify-admin'
|
|||||||
export API_HOST_NAME='http://localhost:6011'
|
export API_HOST_NAME='http://localhost:6011'
|
||||||
export DANGEROUS_SALT='dev-notify-salt'
|
export DANGEROUS_SALT='dev-notify-salt'
|
||||||
export SECRET_KEY='dev-notify-secret-key'
|
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
|
"> environment.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
import re
|
import re
|
||||||
from wtforms import ValidationError
|
from wtforms import ValidationError
|
||||||
from datetime import datetime
|
|
||||||
from app.main.encryption import check_hash
|
|
||||||
from notifications_utils.template import Template
|
from notifications_utils.template import Template
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,7 @@
|
|||||||
Flask==0.10.1
|
Flask==0.10.1
|
||||||
Flask-Script==2.0.5
|
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-WTF==0.11
|
||||||
Flask-Login==0.2.11
|
Flask-Login==0.2.11
|
||||||
Flask-Bcrypt==0.6.2
|
|
||||||
credstash==1.8.0
|
credstash==1.8.0
|
||||||
boto3==1.2.3
|
boto3==1.2.3
|
||||||
Pygments==2.0.2
|
Pygments==2.0.2
|
||||||
|
|||||||
@@ -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
|
|
||||||
Reference in New Issue
Block a user