mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Added coverage for get_default_config_file, also a test for default config overrides
This commit is contained in:
parent
c218792fa4
commit
a716285ed0
@ -193,6 +193,19 @@ def test_cli_overrides_config():
|
|||||||
t.eq(app.cfg.bind, ["blarney"])
|
t.eq(app.cfg.bind, ["blarney"])
|
||||||
t.eq(app.cfg.proc_name, "fooey")
|
t.eq(app.cfg.proc_name, "fooey")
|
||||||
|
|
||||||
|
def test_default_config_file():
|
||||||
|
default_config = os.path.join(os.path.abspath(os.getcwd()),
|
||||||
|
'gunicorn.conf.py')
|
||||||
|
with open(default_config, 'w+') as default:
|
||||||
|
default.write("bind='0.0.0.0:9090'")
|
||||||
|
|
||||||
|
t.eq(config.get_default_config_file(), default_config)
|
||||||
|
|
||||||
|
with AltArgs(["prog_name"]):
|
||||||
|
app = NoConfigApp()
|
||||||
|
t.eq(app.cfg.bind, ["0.0.0.0:9090"])
|
||||||
|
|
||||||
|
os.unlink(default_config)
|
||||||
|
|
||||||
def test_post_request():
|
def test_post_request():
|
||||||
c = config.Config()
|
c = config.Config()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user