@@ -267,7 +267,7 @@ def test_invalid_strip_relative_path(prefix, partial_path):
267
267
def test_port_env_fail_str (empty_environ ):
268
268
app = Dash ()
269
269
with pytest .raises (Exception ) as excinfo :
270
- app .run_server (port = "garbage" )
270
+ app .run (port = "garbage" )
271
271
assert (
272
272
excinfo .exconly ()
273
273
== "ValueError: Expecting an integer from 1 to 65535, found port='garbage'"
@@ -277,14 +277,14 @@ def test_port_env_fail_str(empty_environ):
277
277
def test_port_env_fail_range (empty_environ ):
278
278
app = Dash ()
279
279
with pytest .raises (Exception ) as excinfo :
280
- app .run_server (port = "0" )
280
+ app .run (port = "0" )
281
281
assert (
282
282
excinfo .exconly ()
283
283
== "AssertionError: Expecting an integer from 1 to 65535, found port=0"
284
284
)
285
285
286
286
with pytest .raises (Exception ) as excinfo :
287
- app .run_server (port = "65536" )
287
+ app .run (port = "65536" )
288
288
assert (
289
289
excinfo .exconly ()
290
290
== "AssertionError: Expecting an integer from 1 to 65535, found port=65536"
@@ -304,7 +304,7 @@ def test_no_proxy_success(mocker, caplog, empty_environ, setlevel_warning):
304
304
# mock out the run method so we don't actually start listening forever
305
305
mocker .patch .object (app .server , "run" )
306
306
307
- app .run_server (port = 8787 )
307
+ app .run (port = 8787 )
308
308
309
309
STARTUP_MESSAGE = "Dash is running on http://127.0.0.1:8787/\n "
310
310
if setlevel_warning :
@@ -328,7 +328,7 @@ def test_proxy_success(mocker, caplog, empty_environ, proxy, host, port, path):
328
328
app = Dash (url_base_pathname = path )
329
329
mocker .patch .object (app .server , "run" )
330
330
331
- app .run_server (proxy = proxystr , host = host , port = port )
331
+ app .run (proxy = proxystr , host = host , port = port )
332
332
333
333
assert "Dash is running on {}{}\n " .format (proxy , path ) in caplog .text
334
334
@@ -341,21 +341,21 @@ def test_proxy_failure(mocker, empty_environ):
341
341
mocker .patch .object (app .server , "run" )
342
342
343
343
with pytest .raises (_exc .ProxyError ) as excinfo :
344
- app .run_server (
344
+ app .run (
345
345
proxy = "https://127.0.0.1:8055::http://plot.ly" , host = "127.0.0.1" , port = 8055
346
346
)
347
347
assert "protocol: http is incompatible with the proxy" in excinfo .exconly ()
348
348
assert "you must use protocol: https" in excinfo .exconly ()
349
349
350
350
with pytest .raises (_exc .ProxyError ) as excinfo :
351
- app .run_server (
351
+ app .run (
352
352
proxy = "http://0.0.0.0:8055::http://plot.ly" , host = "127.0.0.1" , port = 8055
353
353
)
354
354
assert "host: 127.0.0.1 is incompatible with the proxy" in excinfo .exconly ()
355
355
assert "you must use host: 0.0.0.0" in excinfo .exconly ()
356
356
357
357
with pytest .raises (_exc .ProxyError ) as excinfo :
358
- app .run_server (
358
+ app .run (
359
359
proxy = "http://0.0.0.0:8155::http://plot.ly" , host = "0.0.0.0" , port = 8055
360
360
)
361
361
assert "port: 8055 is incompatible with the proxy" in excinfo .exconly ()
0 commit comments