This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pytest | |
from app.helpers import DynamoInterface | |
from app.helpers import user_helpers | |
@pytest.fixture | |
def db(): | |
return DynamoInterface() | |
class TestUserDynamoTable(object): | |
def test_user_table_exists(self, db): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import entire module | |
import user_helpers | |
# Import just the class | |
from dynamo_helper import DynamoInterface |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from app import app | |
from app.helpers import user_helpers as u_helper | |
from app.helpers import DynamoInterface | |
from flask import jsonify, request | |
@app.route("/api/user", methods=['GET']) | |
def get_user(): | |
username = request.args['username'] | |
password = request.args['password'] | |
encrypted_pass = u_helper.encrypt_password(password) |