Skip to content

Commit 2d5eed9

Browse files
committed
rm duplication in test
1 parent 1faffe3 commit 2d5eed9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/integration/multi_page/test_pages_layout.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,11 @@ def get_routing_inputs_app():
202202
# Page with a layout function, should see the routing callback inputs
203203
# as keyword arguments
204204
def layout1(hash: str = None, language: str = "en", **kwargs):
205-
if language == "fr":
206-
return html.Div(f"Le hash dit: {hash}", id="contents")
207-
return html.Div(f"Hash says: {hash}", id="contents")
205+
translations = {
206+
"en": "Hash says: {}",
207+
"fr": "Le hash dit: {}",
208+
}
209+
return html.Div(translations[language].format(hash), id="contents")
208210

209211
dash.register_page(
210212
"function_layout",

0 commit comments

Comments
 (0)