Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,23 @@ def sqlalchemy_db(request: pytest.FixtureRequest, django_db_blocker, django_db_s
original_test_name = settings.DATABASES["default"]["TEST"]["NAME"]
settings.DATABASES["default"]["NAME"] = "sqlalchemy"
settings.DATABASES["default"]["TEST"]["NAME"] = "test_postgres_sqlalchemy"
for connection in connections:
if "timeseries" in connection:
with connections[connection].cursor() as cursor:
cursor.execute(
"SELECT _timescaledb_internal.stop_background_workers();"
)
db_cfg = setup_databases(
verbosity=request.config.option.verbose,
interactive=False,
keepdb=keepdb,
)
for connection in connections:
if "timeseries" in connection:
with connections[connection].cursor() as cursor:
cursor.execute(
"SELECT _timescaledb_internal.start_background_workers();"
)
settings.DATABASES["default"]["NAME"] = original_db_name
settings.DATABASES["default"]["TEST"]["NAME"] = original_test_name

Expand Down
6 changes: 5 additions & 1 deletion services/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,16 @@


def get_test_analytics_url(repo: Repository, commit: Commit) -> str:
if commit.branch is not None:
branch_name = quote_plus(commit.branch)
else:
branch_name = quote_plus(repo.branch)

Check warning on line 205 in services/urls.py

View check run for this annotation

Codecov Notifications / codecov/patch

services/urls.py#L205

Added line #L205 was not covered by tests
return SiteUrls.test_analytics_url.get_url(
dashboard_base_url=get_dashboard_base_url(),
service_short=services_short_dict.get(repo.service),
username=repo.owner.username,
project_name=repo.name,
branch_name=quote_plus(commit.branch),
branch_name=branch_name,
)


Expand Down
Loading