| 342 | [False, True], |
| 343 | ) |
| 344 | def test_no_proxy_success(mocker, caplog, empty_environ, setlevel_warning): |
| 345 | app = Dash() |
| 346 | |
| 347 | if setlevel_warning: |
| 348 | app.logger.setLevel(logging.WARNING) |
| 349 | |
| 350 | # mock out the run method so we don't actually start listening forever |
| 351 | mocker.patch.object(app.server, "run") |
| 352 | |
| 353 | app.run(port=8787) |
| 354 | |
| 355 | STARTUP_MESSAGE = "Dash is running on http://127.0.0.1:8787/\n" |
| 356 | if setlevel_warning: |
| 357 | assert caplog.text is None or STARTUP_MESSAGE not in caplog.text |
| 358 | else: |
| 359 | assert STARTUP_MESSAGE in caplog.text |
| 360 | |
| 361 | |
| 362 | @pytest.mark.parametrize( |