Skip to content

Commit

Permalink
fix: punctuations (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
lchen-2101 authored Jan 5, 2024
1 parent 3bef614 commit 775a81a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
3 changes: 2 additions & 1 deletion db_revisions/env.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
from urllib import parse
from dotenv import load_dotenv
from logging.config import fileConfig
from sqlalchemy import engine_from_config, pool
Expand Down Expand Up @@ -29,7 +30,7 @@
INST_DB_HOST = os.environ.get("INST_DB_HOST")
INST_DB_NAME = os.environ.get("INST_DB_NAME")
INST_DB_SCHEMA = os.environ.get("INST_DB_SCHEMA")
INST_CONN = f"postgresql://{INST_DB_USER}:{INST_DB_PWD}@{INST_DB_HOST}/{INST_DB_NAME}"
INST_CONN = f"postgresql://{INST_DB_USER}:{parse.quote(INST_DB_PWD, safe='')}@{INST_DB_HOST}/{INST_DB_NAME}"
config.set_main_option("sqlalchemy.url", INST_CONN)

# end specific SBL configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@
depends_on: Union[str, Sequence[str], None] = None

seed_data = [
{"id": "1", "name": "Bank or savings association."},
{"id": "2", "name": "Minority depository institution."},
{"id": "3", "name": "Credit union."},
{"id": "4", "name": "Nondepository institution."},
{"id": "5", "name": "Community development financial institution (CDFI)."},
{"id": "6", "name": "Other nonprofit financial institution."},
{"id": "7", "name": "Farm Credit System institution."},
{"id": "8", "name": "Government lender."},
{"id": "9", "name": "Commercial finance company."},
{"id": "10", "name": "Equipment finance company."},
{"id": "11", "name": "Industrial loan company."},
{"id": "12", "name": "Online lender."},
{"id": "1", "name": "Bank or savings association"},
{"id": "2", "name": "Minority depository institution"},
{"id": "3", "name": "Credit union"},
{"id": "4", "name": "Nondepository institution"},
{"id": "5", "name": "Community development financial institution (CDFI)"},
{"id": "6", "name": "Other nonprofit financial institution"},
{"id": "7", "name": "Farm Credit System institution"},
{"id": "8", "name": "Government lender"},
{"id": "9", "name": "Commercial finance company"},
{"id": "10", "name": "Equipment finance company"},
{"id": "11", "name": "Industrial loan company"},
{"id": "12", "name": "Online lender"},
{"id": "13", "name": "Other"},
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
{"id": "15", "name": "MBS of Savings and Loan Holding Co"},
{"id": "16", "name": "MBS of state chartered Thrift"},
{"id": "17", "name": "MBS of federally chartered thrift (OCC supervised)"},
{"id": "18", "name": "Affiliate of depository institution. MBS is in the same ownership org as a depository."},
{"id": "18", "name": "Affiliate of depository institution; MBS is in the same ownership org as a depository"},
]


Expand Down
2 changes: 1 addition & 1 deletion tests/migrations/test_lookup_tables_data_seed.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def test_sbl_institution_type_data_seed(alembic_runner: MigrationContext, alembi
sbl_institution_type_rows = conn.execute(
text("SELECT id, name from %s where id = :id " % sbl_institution_type_tablename), (dict(id="1"))
).fetchall()
sbl_institution_type_expected = [("1", "Bank or savings association.")]
sbl_institution_type_expected = [("1", "Bank or savings association")]

assert sbl_institution_type_rows == sbl_institution_type_expected

Expand Down

0 comments on commit 775a81a

Please sign in to comment.