Added base-path support in URL generating features (#288)

Add the basepath dash url to the path generation for dynamicly generated
links.
This commit is contained in:
2023-10-29 20:40:40 +01:00
committed by GitHub
parent 6526549bdd
commit f72d606d18
4 changed files with 20 additions and 7 deletions

View File

@ -31,10 +31,17 @@ def test_go_to_home() -> None:
assert output == "/"
def test_go_to_detail_page() -> None:
def test_go_to_detail_page1(monkeypatch: MonkeyPatch) -> None:
"""Checks if the go_to_detail_page callback yields a result."""
monkeypatch.setenv("DASH_URL_BASE_PATHNAME", "/monkey_path/")
output = app.go_to_detail_page("c_1")
assert output == "/monkey_path/unternehmensdetails/1"
def test_go_to_detail_page2() -> None:
"""Checks if the go_to_detail_page callback yields a result."""
output = app.go_to_detail_page("c_1")
assert output == "/Unternehmensdetails/1"
assert output == "/unternehmensdetails/1"
def test_main_of_app(monkeypatch: MonkeyPatch) -> None: