Skip to content

Commit 5a98989

Browse files
authored
Merge pull request #1548 from danielklim/danielklim/basedashrunner-host-option
enable changing of url relative to selenium
2 parents 6545710 + bb66d95 commit 5a98989

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

dash/testing/application_runners.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ class BaseDashRunner:
6161

6262
_next_port = 58050
6363

64-
def __init__(self, keep_open, stop_timeout):
64+
def __init__(self, keep_open, stop_timeout, scheme="http", host="localhost"):
65+
self.scheme = scheme
66+
self.host = host
6567
self.port = 8050
6668
self.started = None
6769
self.keep_open = keep_open
@@ -102,7 +104,7 @@ def __exit__(self, exc_type, exc_val, traceback):
102104
@property
103105
def url(self):
104106
"""The default server url."""
105-
return f"http://localhost:{self.port}"
107+
return f"{self.scheme}://{self.host}:{self.port}"
106108

107109
@property
108110
def is_windows(self):

0 commit comments

Comments
 (0)