address review: strip trailing slash in cache-warmup test expectations

get_dash_url() now rstrips the trailing slash from WEBDRIVER_BASEURL, so
the test expectations need the same treatment — otherwise a baseurl that
ends in / produces double-slash URLs that no longer match strategy
output. Fixes both test_top_n_dashboards_strategy and
test_dashboard_tags_strategy.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Evan Rusackas
2026-04-22 12:39:25 -07:00
parent 7476838f26
commit c5475c3a2d

View File

@@ -83,7 +83,7 @@ class TestCacheWarmUp(SupersetTestCase):
strategy = TopNDashboardsStrategy(1)
result = sorted(strategy.get_urls())
expected = sorted([f"{get_url_host()}{dash.url}"])
expected = sorted([f"{get_url_host().rstrip('/')}{dash.url}"])
assert result == expected
def reset_tag(self, tag):
@@ -109,7 +109,7 @@ class TestCacheWarmUp(SupersetTestCase):
# tag dashboard 'births' with `tag1`
tag1 = get_tag("tag1", db.session, TagType.custom)
dash = self.get_dash_by_slug("births")
tag1_urls = [f"{get_url_host()}{dash.url}"]
tag1_urls = [f"{get_url_host().rstrip('/')}{dash.url}"]
tagged_object = TaggedObject(
tag_id=tag1.id, object_id=dash.id, object_type=ObjectType.dashboard
)