mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
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:
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user