-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
488d463
commit 3250937
Showing
9 changed files
with
60 additions
and
23 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
FLASK_APP=wsgi.py | ||
FLASK_DEBUG=False | ||
SECRET_KEY=yoursecretkey | ||
SQLALCHEMY_DATABASE_URI=mysql+pymysql://myuser:[email protected]:1234/mydatabase | ||
|
||
SQLALCHEMY_DATABASE_HOST=db.example.com | ||
SQLALCHEMY_DATABASE_TABLE=my_table | ||
SQLALCHEMY_DATABASE_NAME=my_database | ||
SQLALCHEMY_DATABASE_URI=mysql+pymysql://username:[email protected]:1234/my_database | ||
SQLALCHEMY_DATABASE_PEM="-----BEGIN CERTIFICATE-----\n[NONSENSICAL_KEY_STORED_ON_SINGLE_LINE]\n-----END CERTIFICATE-----\n" | ||
SQLALCHEMY_DATABASE_URI=mysql+pymysql://myuser:[email protected]:1234/my_database | ||
|
||
COMPRESSOR_DEBUG=True | ||
LESS_BIN=/usr/local/bin/lessc | ||
ASSETS_DEBUG=False | ||
|
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
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
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
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
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
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
"""PyTest mocked fixtures.""" | ||
|
||
import pytest | ||
|
||
from clients import Database | ||
from config import settings | ||
|
||
|
||
@pytest.fixture | ||
def db() -> Database: | ||
"""Return a valid database object.""" | ||
return Database( | ||
uri=settings.SQLALCHEMY_DATABASE_URI, | ||
table=settings.SQLALCHEMY_DATABASE_TABLE, | ||
args=settings.SQLALCHEMY_CONNECT_ARGS, | ||
) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
"""Basic tests for validating app functionality.""" | ||
|
||
import pytest | ||
from pandas import DataFrame | ||
|
||
from clients.database import Database | ||
|
||
|
||
def test_fetch_sql_data(db: Database): | ||
"""Test fetching data from a table.""" | ||
data = db.get_table_data() | ||
assert type(data) == DataFrame |