Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable changing of url relative to selenium #1548

Merged
merged 4 commits into from
Sep 5, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion dash/testing/application_runners.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new attributes should be added as argument with their defaults.

self.port = 8050
self.started = None
self.keep_open = keep_open
Expand Down Expand Up @@ -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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolve conflict by using f-string.


@property
def is_windows(self):
Expand Down