-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
serve_locally by default #722
Changes from 3 commits
1afc0c8
aba2b15
cf46e6b
c096aa1
95bcbad
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,6 +48,7 @@ def test_external(self): | |
) | ||
app.layout = dcc.Markdown() | ||
app.scripts.config.serve_locally = False | ||
app.scripts.config.xxx = 123 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hun? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Senator, I do not recall. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I saw it at the time and had assumed it was to test for acceptance of randomly-named config keys :) |
||
|
||
with mock.patch('dash.dash.os.stat', return_value=StatMock()): | ||
resource = app._collect_and_register_resources( | ||
|
@@ -67,7 +68,9 @@ def test_internal(self): | |
assets_ignore='load_after.+.js' | ||
) | ||
app.layout = dcc.Markdown() | ||
app.scripts.config.serve_locally = True | ||
|
||
self.assertEqual(app.scripts.config.serve_locally, True) | ||
self.assertEqual(app.css.config.serve_locally, True) | ||
|
||
with mock.patch('dash.dash.os.stat', return_value=StatMock()): | ||
with mock.patch('dash.dash.importlib.import_module', | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way we did this before, despite the fact that
Scripts
was instantiated,Scripts.config
was a singleton. Mostly this is OK, dunno if there will ever be a reason to put twoScripts
instances in one Python session, but it caused our test cases to be coupled to each other. I had to change this to an instance when I took out all the otherwise superfluous overrides in our test cases.