From b9ee54c54cdbe8edf0a455d33d91c5c2378020b1 Mon Sep 17 00:00:00 2001 From: Dan Lim Date: Sun, 7 Feb 2021 23:09:29 -0800 Subject: [PATCH 1/2] enable changing of url relative to selenium --- dash/testing/application_runners.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dash/testing/application_runners.py b/dash/testing/application_runners.py index d2c2b898a8..8c69191f23 100644 --- a/dash/testing/application_runners.py +++ b/dash/testing/application_runners.py @@ -52,6 +52,8 @@ class BaseDashRunner(object): """Base context manager class for running applications.""" def __init__(self, keep_open, stop_timeout): + self.scheme = 'http' + self.host = 'localhost' self.port = 8050 self.started = None self.keep_open = keep_open @@ -92,7 +94,7 @@ def __exit__(self, exc_type, exc_val, traceback): @property def url(self): """The default server url.""" - return "http://localhost:{}".format(self.port) + return "{}://{}:{}".format(self.scheme, self.host, self.port) @property def is_windows(self): From 412018166be4a100ee807005ef2efb9686b79bf4 Mon Sep 17 00:00:00 2001 From: Dan Lim Date: Wed, 10 Feb 2021 12:17:41 -0800 Subject: [PATCH 2/2] double quotes to pass linting --- dash/testing/application_runners.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dash/testing/application_runners.py b/dash/testing/application_runners.py index 8c69191f23..b3bd0e2c4b 100644 --- a/dash/testing/application_runners.py +++ b/dash/testing/application_runners.py @@ -52,8 +52,8 @@ class BaseDashRunner(object): """Base context manager class for running applications.""" def __init__(self, keep_open, stop_timeout): - self.scheme = 'http' - self.host = 'localhost' + self.scheme = "http" + self.host = "localhost" self.port = 8050 self.started = None self.keep_open = keep_open