Skip to content

Commit

Permalink
Rename TEST_DATABASE_URL to just DATABASE_URL
Browse files Browse the repository at this point in the history
This is gonna make it easier to clean things up and apply the
cookiecutter to h in future commits.
  • Loading branch information
seanh committed Jan 2, 2024
1 parent 00fd706 commit c72c374
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/functional/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"pyramid.debug_all": False,
"secret_key": "notasecret",
"sqlalchemy.url": os.environ.get(
"TEST_DATABASE_URL", "postgresql://postgres@localhost/htest"
"DATABASE_URL", "postgresql://postgres@localhost/htest"
),
}

Expand Down
8 changes: 4 additions & 4 deletions tests/unit/h/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
from tests.common.fixtures.services import * # pylint:disable=wildcard-import,unused-wildcard-import

TEST_AUTHORITY = "example.com"
TEST_DATABASE_URL = database_url(
os.environ.get("TEST_DATABASE_URL", "postgresql://postgres@localhost/htest")
DATABASE_URL = database_url(
os.environ.get("DATABASE_URL", "postgresql://postgres@localhost/htest")
)

Session = sessionmaker()
Expand Down Expand Up @@ -73,7 +73,7 @@ def cli():
@pytest.fixture(scope="session")
def db_engine(tmp_path_factory):
"""Set up the database connection and create tables."""
engine = sqlalchemy.create_engine(TEST_DATABASE_URL)
engine = sqlalchemy.create_engine(DATABASE_URL)

shared_tmpdir = tmp_path_factory.getbasetemp().parent
done_file = shared_tmpdir / "db_initialized.done"
Expand Down Expand Up @@ -229,4 +229,4 @@ def pyramid_csrf_request(pyramid_request):
@pytest.fixture
def pyramid_settings():
"""Return the default app settings."""
return {"sqlalchemy.url": TEST_DATABASE_URL}
return {"sqlalchemy.url": DATABASE_URL}
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ passenv =
dev: NODE_ENV
dev: PROXY_AUTH

{tests,functests}: TEST_DATABASE_URL
{tests,functests}: DATABASE_URL
{tests,functests}: ELASTICSEARCH_URL
{tests,functests}: PYTEST_ADDOPTS
functests: BROKER_URL
Expand Down

0 comments on commit c72c374

Please sign in to comment.